surf plot: Z must be a matrix, not a scalar or vector
1 view (last 30 days)
Show older comments
Hi guys,
I am having the error as titled. My problem is a bit different from the others. I have a matrix Res = 33x201x181 which was generated from 3 different parameters. A = 1x33, B = 1x201 and C = 1x181. I want to do a surface plot like
surf(B,C,Res(1,:,:))
But it kept coming with the error of Z must be a matrix. I don't really understand why Res(1,:,:) wasn't recognize as matrix. Thank you for you help.
Answers (1)
See Also
Categories
Find more on Surface and Mesh Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!