Undefined function or variable 'a'?

Hello, i am trying to export a plot into a jpeg file but i always get the following error message: Undefined function or variable 'a'.
The code is the following:
t=0:0.01:(3*pi)/2;
x =sin(1.8*pi*t);
plot(t,x,'r-.');
imwrite(a,'a1.jpg');
i also got the same error while trying to use saveas command instead. Does anyone know what am i doing wrong?

 Respuesta aceptada

madhan ravi
madhan ravi el 18 de Dic. de 2018
Editada: madhan ravi el 18 de Dic. de 2018
t=0:0.01:(3*pi)/2;
x =sin(1.8.*pi.*t);
plot(t,x,'r-.');
saveas(gcf,'example.jpg') % not imwrite

Más respuestas (0)

Categorías

Más información sobre Images en Centro de ayuda y File Exchange.

Productos

Versión

R2018a

Preguntada:

el 18 de Dic. de 2018

Comentada:

el 18 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