i have some equations and corresponding graph, i am trying to find graph using that equations and i found second graph (green) correctly but in first graph (red color) something being wrong, i am unable to detect the problem, so please help……. my code is:
clc;clear all;r=1024;c=1024;p=32;m=8;for i= 1:r for j=1:c if mod(i/(m*p),2) %even
SP(i,j) = pi-round((i/p)*2*pi/m) ; else % odd
SP(i,j)=-pi+round(((i/p)+1)*2*pi/m) ; end end endfigure(1),plot(SP,'r')hold on%%stair phase-2
p=256;m=1;n=4;for i= 1:r for j=1:c SP1(i,j) = pi-round(i/(m*p))*(2*pi/n); endendplot(SP1,'g')hold off
Best Answer