MATLAB Answers

About 3D surface plot

8 views (last 30 days)
I have simple question on 3D plot. I have dataset, a = 100*1*51. When I give command surf(bb) the message shows CData must be an M-by-N matrix or M-by-N-by-3 array. Please guide me where is problem? I am also attaching my raw data file.
Regards, Akand

  0 Comments

Sign in to comment.

Accepted Answer

Shoaibur Rahman
Shoaibur Rahman on 26 Feb 2015
a = ...your 100 x 1 x 51 data;
bb = squeeze(a);
surf(bb)

  3 Comments

Akand Islam
Akand Islam on 26 Feb 2015
Thanks.
-- Akand
Star Strider
Star Strider on 26 Feb 2015
@Akand — If Shoaibur’s Answer solved your problem, please Accept it.
Akand Islam
Akand Islam on 19 Mar 2015
However, I have hdf file whose size say, 32 50 50. "squeeze" command doesn't help to produce surface plot by "surf".
-- Akand

Sign in to comment.

More Answers (0)

Sign in to answer this question.

Tags