Problem with converting a value into double
I read 2 matrix from txt files, for example, two 2×3 matrix A=[740 850 550 ; 830 820 200 ] B=[742 851 552 ; 835 818 220 ]
and want to calculate A-B, but in the 2×3 ans, all nubmers are zeros ans= [0 0 0; 0 0 0]
I tried to convert them to double using double(A), double(B), but it doesn’t work
Also I tried several things
A+1 gives me 0.001*(A+1), also, say [0.0741 0.0851 0.0551; 0.0831 0.0821 0.0201]
A+0.1 gives me 0.001*(A), also, say [0.0740 0.0850 0.0550; 0.0830 0.0820 0.0200]
even after A=double(A), then do A+1, it gives me the same values as listed in 1
Can anyone help me to solve this?I read 2 matrix from txt files, for example, two 2×3 matrix A=[740 850 550 ; 830 820 200 ] B=[742 851 552 ; 835 818 220 ]
and want to calculate A-B, but in the 2×3 ans, all nubmers are zeros ans= [0 0 0; 0 0 0]
I tried to convert them to double using double(A), double(B), but it doesn’t work
Also I tried several things
A+1 gives me 0.001*(A+1), also, say [0.0741 0.0851 0.0551; 0.0831 0.0821 0.0201]
A+0.1 gives me 0.001*(A), also, say [0.0740 0.0850 0.0550; 0.0830 0.0820 0.0200]
even after A=double(A), then do A+1, it gives me the same values as listed in 1
Can anyone help me to solve this? I read 2 matrix from txt files, for example, two 2×3 matrix A=[740 850 550 ; 830 820 200 ] B=[742 851 552 ; 835 818 220 ]
and want to calculate A-B, but in the 2×3 ans, all nubmers are zeros ans= [0 0 0; 0 0 0]
I tried to convert them to double using double(A), double(B), but it doesn’t work
Also I tried several things
A+1 gives me 0.001*(A+1), also, say [0.0741 0.0851 0.0551; 0.0831 0.0821 0.0201]
A+0.1 gives me 0.001*(A), also, say [0.0740 0.0850 0.0550; 0.0830 0.0820 0.0200]
even after A=double(A), then do A+1, it gives me the same values as listed in 1
Can anyone help me to solve this? double, matlab, unit MATLAB Answers — New Questions