Help debugging my program for plotting ezplot of sin and cos

 채택된 답변

madhan ravi
madhan ravi 2018년 12월 6일
편집: madhan ravi 2018년 12월 6일
x=0:1:pi;
a=@(x) sin(pi*x);
y=@(x) cos(4*pi*x);
ezplot(a,[0,2]); % you forgot to add [ ] brackets
hold on;
ezplot(y,[0,2]);
see the attached screenshot of the graph produced
Screen Shot 2018-12-06 at 12.46.47 PM.png

댓글 수: 6

thanks a lot!
Anytime :) , if it worked make sure to accept the anwer and vote for it.
my MATLAB v2013 is showing these errors. I tried to copy ans paste your code.
you have a file named as class.m please change it's name or delete it
sorry I'm a noob .....thank you so much :)
You're welcome :)

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

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

태그

질문:

2018년 12월 6일

댓글:

2018년 12월 6일

Community Treasure Hunt

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

Start Hunting!

Translated by