MATLAB Answers

Using Surf function with matrix

1 view (last 30 days)
Scott Dean Seedell
Scott Dean Seedell on 1 Aug 2020
Answered: Alan Stevens on 1 Aug 2020
Can anyone give a quick solution how I can generate a surface plot using 3x column matrix (C attached).
when using: surf(C(:,1),C(:,2),C(:,3))
I get the message 'Z must be a matrix, not a scalar or vector'
Thanks

  1 Comment

Sriram Tadavarty
Sriram Tadavarty on 1 Aug 2020
Try directly surf(C) and see if the output is as expected.

Sign in to comment.

Answers (2)

madhan ravi
madhan ravi on 1 Aug 2020
surf(C)

  0 Comments

Sign in to comment.


Alan Stevens
Alan Stevens on 1 Aug 2020
What about simply:
surf(C)

  0 Comments

Sign in to comment.

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by