Info

この質問は閉じられています。 編集または回答するには再度開いてください。

Why does for loop not show me the two plots?

1 回表示 (過去 30 日間)
Amalia
Amalia 2014 年 2 月 8 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
%Loading data
for ii=1:2
load(['uz' num2str(ii) '.txt']);
end
B=cat(2,uz1,uz2);
step=100;
%Plotting data
for k=1:2
subplot(1,2,k)
[X,Y]=meshgrid([min(B(:,1,k)):step:max(B(:,1,k))],[min(B(:,2,k)):step:max(B(:,2,k))]);
[Z]=griddata(B(:,1,k),B(:,2,k),B(:,4,k)*10e4,X,Y);
surf(X,Y,Z,'EdgeColor','none');
shading interp
axis equal
view(0, 90)
colorbar
end
This is the errors:
Index exceeds matrix dimensions.
  1 件のコメント
Walter Roberson
Walter Roberson 2014 年 2 月 8 日
Which line does it give the error on?
What does size(B) show?

回答 (0 件)

この質問は閉じられています。

Community Treasure Hunt

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

Start Hunting!

Translated by