error while using ezplot

조회 수: 4 (최근 30일)
Celeste Tybor
Celeste Tybor 2016년 10월 25일
답변: Star Strider 2016년 10월 25일
I am trying to plot this equation given by my professor:
M=ezplot((1654/21)*(atan(2*(t-45)/21)+atan(30/7)),[1,90])
and this error is coming up:
Error using ezplot (line 69) Input must be a string expression, function name, function handle, or INLINE object.
What does this mean and how can I get a graph?

채택된 답변

Star Strider
Star Strider 2016년 10월 25일
Add ‘@(t)’ to create an anonymous function from your expression, and it works:
M = ezplot(@(t) (1654/21)*(atan(2*(t-45)/21)+atan(30/7)),[1,90])
See the section on ‘Anonymous Functions’ in Function Basics for details.

추가 답변 (0개)

태그

Community Treasure Hunt

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

Start Hunting!

Translated by