How can I plot various vectors together with surf or mesh when they have different x, y and z values?
Afficher commentaires plus anciens
Hello,
assuming I have 4 times of these two vectors
G=[-1 2 5 -3 3 4] %(x)
P=[36 45 23 54 56 23] %(y)
G=[2 -3 5 -3 3 1]
P=[46 23 45 79 23 12]
G=[2 2 -3 2 3 -1]
P=[36 45 23 54 56 23]
G=[-1 -4 -4 -3 3 2]
P=[36 37 14 54 56 56]
each and every pair gives you a plot if you just do plot(G,P)
What I want to do is plot them on a mesh or surf so that X axis will have the P values Y axis will have the G values for each P and the Z axis will just be a number from 1:4 or as many the plots are.
my thoughts up to now come to interpolation in order to fix all the P values somehow , but I really do not know how to do it.
Any suggestions?
/Andreas T.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Surface and Mesh Plots dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
