i have an equation and trying to write in matlab but i am not getting desired result so please help me.
please find attached file for equation and result shown in red line in figure for that equation.
i am trying like
r=1000;c=1000;p=32;m=8;for i= 1:r for j=1:c if mod(i/(m*p),2) %odd
SP(i,j)=-pi+round((i/p)+1)*(2*pi/m) ; else % even
SP(i,j)=pi-round(i/p)*(2*pi/m); end endendfigure(1)plot(SP)
Best Answer