How to change axes values?

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?

Respuestas (1)

KSSV
KSSV el 11 de Dic. de 2018

0 votos

Read about pcolor. USe pcolor. Or else you may use image and specify the positions.

4 comentarios

sam plant
sam plant el 11 de Dic. de 2018
example.png
managed to fix this by adding axes to the image sc, i just need to set my y axis from 10-80 instead of 80-10, any ideas?
KSSV
KSSV el 11 de Dic. de 2018
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 el 11 de Dic. de 2018
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 el 12 de Dic. de 2018
X = rand(10) ;
imagesc(X)
set(gca,'YDir','normal')

Iniciar sesión para comentar.

Preguntada:

el 11 de Dic. de 2018

Comentada:

el 12 de Dic. de 2018

Community Treasure Hunt

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

Start Hunting!

Translated by