How do I solve this error 'Subscripted assignment dimension mismatch.'
古いコメントを表示
Hi, guys please can someone help me resolve why the below code returns the above mentioned error.
N = 100;
z1 = zeros(1,N);
z = meshgrid(z1);
p = meshgrid(z1);
for ii=1:length(aa)
xn=linspace(-aa(ii),aa(ii),N); yn=linspace(-bb(ii),bb(ii),N);
for i=1:length(xn)
for j=1:length(yn)
z(i,j) = (1 - (xn(i)/aa(ii))^2 - (yn(j)/bb(ii))^2);
if z(i,j)<0
z(i,j)=0;
end
p(i,j) = 1.5.*F_N.*(pi*aa(ii)*bb(ii))^-1*sqrt(z(i,j));
end
end
end
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Develop Apps Using App Designer についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!