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

1 回表示 (過去 30 日間)
Anna Gerald
Anna Gerald 2018 年 6 月 22 日
コメント済み: Anna Gerald 2018 年 6 月 23 日
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

採用された回答

Ameer Hamza
Ameer Hamza 2018 年 6 月 22 日
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 件のコメント
Ameer Hamza
Ameer Hamza 2018 年 6 月 22 日
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?
Anna Gerald
Anna Gerald 2018 年 6 月 23 日

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by