- #1
vikky_manit
- 3
- 0
M0=100;
var0=100;
i=1:478
j=1:448
if(temp(i,j)>M)
G(i,j)=M0+sqrt(double((var0*power((temp(i,j)-M),2))/V));
else
G(i,j)=M0-sqrt(double((var0*power((temp(i,j)-M),2))/V));
Where temp(i,j) is an matrix. This code is not working. I am getting the values of G as 100. Please help me with the correct code. I am new to matlab.
var0=100;
i=1:478
j=1:448
if(temp(i,j)>M)
G(i,j)=M0+sqrt(double((var0*power((temp(i,j)-M),2))/V));
else
G(i,j)=M0-sqrt(double((var0*power((temp(i,j)-M),2))/V));
Where temp(i,j) is an matrix. This code is not working. I am getting the values of G as 100. Please help me with the correct code. I am new to matlab.