Error with surf function
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Khaled Mahmoud
le 11 Août 2020
Commenté : Khaled Mahmoud
le 11 Août 2020
Hello,
I have the following data dimentions:
x = linspace(1,16,256)
y = linspace(1,16,256)
size( data ) = 256 x 16
I want to plot this as a 3D using surf function. I tried to use surf( x, y, data), but I got an error due to the length of the vectors. Does any body know how can I plot it proberly?
0 commentaires
Réponse acceptée
KSSV
le 11 Août 2020
[m,n] = size(data) ;
x = 1:n ;
y = 1:m ;
surf(x,y,data)
Also you can straight away use:
surf(data) ;
Plus de réponses (1)
Voir également
Catégories
En savoir plus sur Interpolation dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!