필터 지우기
필터 지우기

how to write the following equation in matlab ?

조회 수: 1 (최근 30일)
ajeet verma
ajeet verma 2017년 8월 29일
댓글: ajeet verma 2017년 8월 29일
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?

채택된 답변

KSSV
KSSV 2017년 8월 29일
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
KSSV
KSSV 2017년 8월 29일
What is the the label in y-axis of the figure?
ajeet verma
ajeet verma 2017년 8월 29일
image size is 1024*768

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by