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?

 채택된 답변

madhan ravi
madhan ravi 2018년 12월 18일
편집: madhan ravi 2018년 12월 18일

0 개 추천

t=0:0.01:(3*pi)/2;
x =sin(1.8.*pi.*t);
plot(t,x,'r-.');
saveas(gcf,'example.jpg') % not imwrite

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Images에 대해 자세히 알아보기

제품

릴리스

R2018a

질문:

2018년 12월 18일

댓글:

2018년 12월 18일

Community Treasure Hunt

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

Start Hunting!

Translated by