shuftting graph plot matlab
1 回表示 (過去 30 日間)
古いコメントを表示
theta= inv(A)* S;
th=vec2mat(theta,19);
figure
mesh( th);
1 件のコメント
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
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](https://www.mathworks.com/matlabcentral/answers/uploaded_files/213417/190411%20154709-Figure%201.jpeg)
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Surface and Mesh Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!