How to turn a single vector into matrix in order to have mesh or 3D
    6 vues (au cours des 30 derniers jours)
  
       Afficher commentaires plus anciens
    
Hello all,
I plotted a vector H versus a vector r. its possible to have a plot 3D, i.e H as a function of x and y. r^2=x^2+y^2. Is there a direct method? Thank you for your suggestions !! Adam
0 commentaires
Réponses (1)
  Doug Hull
      
 le 24 Août 2012
        x = linspace(-1,1);
y = linspace(-1,1);
[X,Y] = meshgrid(x,y);
R = sqrt(X.^2 + Y.^2);
surf(X,Y,R)
Voir également
Catégories
				En savoir plus sur Surface and Mesh Plots dans Help Center et File Exchange
			
	Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

