Re-defining variables

Hi everyone,
My independent variable is 5, 10, 16, 24, 32, 40 degrees but in the data set it is stored as 1, 2, 3, 4, 5, 6 (each number maps onto each angle). How do I change the x axis of my graph to be the actual angle values and not 1-6?

Respuestas (1)

Star Strider
Star Strider el 20 de Ag. de 2020

0 votos

Create a vector of the angles, then plot against that instead:
Angles = [5, 10, 16, 24, 32, 40];
figure
plot(Angles, Data)
grid
legend( ... )
.

Etiquetas

Preguntada:

el 20 de Ag. de 2020

Respondida:

el 20 de Ag. de 2020

Community Treasure Hunt

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

Start Hunting!

Translated by