for i5=1:vdim*rdim v(i5)=w(i5)+alpha(i5)*w(i5); if v(i5)<0 zerocoeff = v(i5<0); v(i5)=0;else v(i5)=v(i5);endend
MATLAB: I want to code the following such that the negative values get saved in zerocoeff and then the negative values becomes zero . I have tried something but i m still getting an empty zerocoeff .
for loop
Best Answer