surf plot: Z must be a matrix, not a scalar or vector

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.

Tags

Asked:

on 14 Jul 2017

Answered:

on 14 Jul 2017

Community Treasure Hunt

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

Start Hunting!