I'm not sure why this isn't working? I have a matrix A that contains my numerical data. I am just trying to plot a certain portion of the data but I get an error.
a = A(2253:2705,2).';
a1 = A(2253:2705,3).';
z = zeros(size(a));
time = A(2253:2705,1).';
surface([a;a],[a1;a1],[z;z],[time:time],...
'facecol','no',...
'edgecol','interp',...
'linew',2);
ERROR: Warning: Error creating or updating surface
Error in value of property CData
Array is wrong shape or size

 採用された回答

Steven Lord
Steven Lord 2019 年 8 月 26 日

0 投票

[time:time]
You have a typo here. This results in a scalar, not an array the same size as your other inputs to surface. Try:
[time;time]

その他の回答 (0 件)

カテゴリ

タグ

質問済み:

2019 年 8 月 26 日

回答済み:

2019 年 8 月 26 日

Community Treasure Hunt

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

Start Hunting!

Translated by