How do i plot a graph between 3 variables?graph for x y and z

1 vue (au cours des 30 derniers jours)
Anna Gerald
Anna Gerald le 22 Juin 2018
Commenté : Anna Gerald le 23 Juin 2018
data=xlsread('a.xlsx'); X=data(:,6); Y=data(:,5);
for i=2:37 Z=(Y(i,1)-Y(i-1,1))/X(i,1);
end

Réponse acceptée

Ameer Hamza
Ameer Hamza le 22 Juin 2018
You need to index the variable Z,
Z = zeros(size(X));
for i=2:37
Z(i)=(Y(i,1)-Y(i-1,1))/X(i,1);
endl
plot3(X,Y,Z);
  5 commentaires
Ameer Hamza
Ameer Hamza le 22 Juin 2018
It depends on the values of 3 variables, If they are in the form of the grid then you can plot a surface. Can you attach the file so that I can make a proper suggestion?

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Line Plots 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!

Translated by