MATLAB Answers

double type+ surf error

1 view (last 30 days)
how can i show the surface of image b? Please advise. Thankssss

Accepted Answer

Thukiller
Thukiller on 7 May 2021
When you use 'surf(x)', x cannot be a 3-dimensional vector,maybe you can use 'surf(b(:,:,1), b(:,:,2), b(:,:,3))'
if you need to know more about surf(), you can use 'doc surf'
  1 Comment
Ou Jin Sheng
Ou Jin Sheng on 9 May 2021
Thank you @Thukiller, It works.

Sign in to comment.

More Answers (1)

VBBV
VBBV on 7 May 2021
Check if b matrix has any NaN values. Due to presence of text elements
  1 Comment
VBBV
VBBV on 7 May 2021
Delete them as
%f true
b(b==NaN) = 0
surf(b)

Sign in to comment.

Products


Release

R2021a

Community Treasure Hunt

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

Start Hunting!