Dear All,
I have a vector [A] which includes positive and negative values A = [1 4 5 2 -3 4 5 7 -6 -6]. I want to change those negative values by adding -180 to them, so my new vector will be like this
A = [1 4 5 2 -183 4 5 7 -186 -186].
Any idea how find that?
So far I tried this but not working
for i = 1:10 for j = 1:1 if A(i,j)<=0 A(i,j) = A + -180; end endend
Best Answer