Hello, I want to plot a graph with a title and label on each axis. I use:
figure(1) title('Engine Pressure') xlabel('theta') ylabel('Pressure') plot(theta,P)
when I run the programme the figure appears, but the title and labels don't.
Can anyone help me please? I know I can label them over the graph when it comes up, but I would like to do it automatically each time I run the code.
Thank you very much in advance.

 Respuesta aceptada

Azzi Abdelmalek
Azzi Abdelmalek el 21 de Mzo. de 2014
Editada: Azzi Abdelmalek el 21 de Mzo. de 2014

0 votos

Change the order
figure(1)
plot(theta,P)
title('Engine Pressure')
xlabel('theta')
ylabel('Pressure')

1 comentario

Ana
Ana el 21 de Mzo. de 2014
Can't believe that was the problem! Thanks a million!!!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Preguntada:

Ana
el 21 de Mzo. de 2014

Comentada:

Ana
el 21 de Mzo. de 2014

Community Treasure Hunt

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

Start Hunting!

Translated by