MATLAB Answers

How to change axes values?

11 ビュー (過去 30 日間)
sam plant
sam plant 2018 年 12 月 11 日
コメント済み: KSSV 2018 年 12 月 12 日
I have plotted a matrix using the imagesc function with the x and y axis being the points of the matrix (1-50)
however the positions of the matrix are based on corresponding v0 (velocity) and theta (angle) values for a projectile.
How can i change the axis from matrix positions to corresponding v0 and theta values?
Is there a function for changing x and y axis values?

  0 件のコメント

サインイン to comment.

回答 (1 件)

KSSV
KSSV 2018 年 12 月 11 日
Read about pcolor. USe pcolor. Or else you may use image and specify the positions.

  4 件のコメント

表示 1 件の古いコメント
KSSV
KSSV 2018 年 12 月 11 日
Read about set..somethink like below work:
set('Ydir','reverse')
But it is suggested to use pcolor if you have (x,y).
sam plant
sam plant 2018 年 12 月 11 日
The problem I have with pcolor is the grid that appears, the example picture has used image sc as I have to specify a number of pixels, pcolor makes the image too blocky however the set(reverse) works on pcolor but doesn't work on imagesc.
KSSV
KSSV 2018 年 12 月 12 日
X = rand(10) ;
imagesc(X)
set(gca,'YDir','normal')

サインイン to comment.

サインイン してこの質問に回答します。


Translated by