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; endmind=mind+1;moind=1; endmesh(f,fo,s);hold on;xlabel('\bff');ylabel('\bffo');zlabel('\bfs(m,mo)');
MATLAB: Subscripted assignment dimension mismatch. what does it mean
please solve the problem
Related Question
- Simplify outputs huge result for diff symbolic expression with hyperbolic functions. Part 2.
- URGENT HELP NEEDED FOR PROJECT
- Warning: Matrix is singular, close to singular or badly scaled. Results may be inaccurate. RCOND = NaN ODE15s
- Anonymous function can’t run
- Solve a large composite set of equations numerically
Best Answer