How do i plot a graph between 3 variables?graph for x y and z
2 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
采纳的回答
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
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?
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!