필터 지우기
필터 지우기

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?

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Line Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by