Subscripted assignment dimension mismatch. what does it mean
이전 댓글 표시
clc;
clear;
close all;
k=3;
for i=1:k
fi= input('\nEnter spatial frequency: f(i)=');
f=0:0.01:1;
fo=0:0.01:1;
m=0:0.3:30;
mo=0:0.3:30;
fx=0.2;
fy=0.2;
rho=0.02;
sd=zeros(length(f),length(fo));
s=zeros(length(m),length(mo));
find=1;
foind=1;
mind=1;
moind=1;
for F=f
for Fo=fo
if ((F==fi)&&(Fo==fi))
sk(find,foind)=1;
else
sk(find,foind)=0;
end
g(find,foind)=(1/(fx*fy*sqrt(1-rho^2)))*exp((-1/(2*(1-rho^2)))*((F^2/fx^2)-((2*rho*F*Fo)/(fx*fy))-(Fo^2/fy^2)))/(fx.*fy.*sqrt(1-rho.^2));
sd(find,foind)=sd(find,foind)+conv(sk(find,foind),g(find,foind));
foind=foind+1;
end
find=find+1;
foind=1;
end
for l=1:k
s(mind,moind)=(1/k^2)*(s(mind,moind)+(sd(i/k,l/k)*exp(-j*2*pi*((i*m/k)-(l*mo/k)))));
moind=moind+1;
end
mind=mind+1;
moind=1;
end
mesh(f,fo,s);
hold on;
xlabel('\bff');
ylabel('\bffo');
zlabel('\bfs(m,mo)');
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!