Effacer les filtres
Effacer les filtres

how to write the following equation in matlab ?

1 vue (au cours des 30 derniers jours)
ajeet verma
ajeet verma le 29 Août 2017
Commenté : ajeet verma le 29 Août 2017
equation is in attached file, and i am trying like:
%%stair phase
clc;
clear all;
r=1000;
c=1000;
p=32;
N=8;
for i= 1:r
for j=1:c
SP(i,j)=(-pi+(i/p)*2*pi/m).*(i/(m*p)=even + (-pi+((i/p)+1)*2*pi/m).*(i/(m*p)=odd;
end
end
figure(1)
plot(SP);
please help,, where is wrong?

Réponse acceptée

KSSV
KSSV le 29 Août 2017
r=1000;
c=1000;
p=32;
m=8;
SP = zeros(r,c) ;
for i= 1:r
for j=1:c
if mod(i/(m*p),2) %odd
SP(i,j) = (-pi+((i/p)+1)*2*pi/m).*(i/(m*p)) ; %%=odd;
else % even
SP(i,j)=(-pi+(i/p)*2*pi/m).*(i/(m*p)) ;
end
end
end
figure(1)
surf(SP) ;
shading interp
  3 commentaires
KSSV
KSSV le 29 Août 2017
What is the the label in y-axis of the figure?
ajeet verma
ajeet verma le 29 Août 2017
image size is 1024*768

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Image Processing Toolbox dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by