Quick question on understanding ./ notation
Show older comments
Greetings all,
I have the following "snippet" of code:
Zeta_EM31_West = DrillHoleData2(:,3)/3.67;
%Line above outputs a 16x1 double array, I can provide "DrillHoleData2" if needed
Response_values_H= 0:0.01:9;
R_h=sqrt(4*Response_values_H.^2+1)-(2*Response_values_H);
R_h(Response_values_H>=9.1) = 0;
R_h_Case1A=interp1(Response_values_H,R_h,Zeta_EM31_West);
Now I'm a bit confused on something. Say the next line is this: sigma_2_Case1A=EM31CondMidSwathWest/R_h_Case1A;
where "EM31CondMidSwathWest" is another 16x1 array (and I can provide the numbers if needed). Now just using / will provide me with a 16x16 double, which I understand, but in one column I'll receive values, and the rest are zeros (I also understand this).
What I don't understand is if I say: sigma_2_Case1A=EM31CondMidSwathWest./R_h_Case1A;
which will be a 16x1 double, but the numbers will be different than those with using "/". Shouldn't they be the same?
Thanks! -J
1 Comment
Stephen23
on 19 May 2015
This explains everything:
Accepted Answer
More Answers (1)
the cyclist
on 19 May 2015
1 vote
Categories
Find more on Creating and Concatenating Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!