shuftting graph plot matlab

조회 수: 1 (최근 30일)
Rashid Hussein
Rashid Hussein 2019년 4월 11일
댓글: Adam Danz 2019년 4월 11일
theta= inv(A)* S;
th=vec2mat(theta,19);
figure
mesh( th);
  댓글 수: 1
Adam Danz
Adam Danz 2019년 4월 11일
The original question asked how to shift the x and y coordinates of a mesh plot produced by mesh(z).

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

채택된 답변

Adam Danz
Adam Danz 2019년 4월 11일
mesh(Z) by itself uses the row and column index values of Z as the x and y coordinates. Your matrix is [9x19] so the x values are 1:9 and the y values are 1:19.
If you'd like to start at x=-4 and y=-9, you'll need to produce your own X and Y values using meshgrid().
[Xval, Yval] = meshgrid((1:size(th,2))-10, (1:size(th,1))-5); %shift x and y so they start at -4 and -9
figure
mesh(Xval, Yval, th);
190411 154709-Figure 1.jpg
  댓글 수: 2
Rashid Hussein
Rashid Hussein 2019년 4월 11일
thankyou sir , thankyou so much from my heart
Adam Danz
Adam Danz 2019년 4월 11일
Any time!

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by