How do you create a plot of a function using fplot?

조회 수: 3 (최근 30일)
jay jay
jay jay 2022년 12월 20일
댓글: Voss 2022년 12월 20일
f(t)=@(t) 5*t.^2;
fplot(f(t))
why is this wrong?

답변 (2개)

Les Beckham
Les Beckham 2022년 12월 20일
Maybe you want ezplot instead of fplot. Your anonymous function definition syntax is wrong as well.
Try this:
f = @(t) 5*t.^2;
ezplot(f)
grid on

Voss
Voss 2022년 12월 20일
f = @(t)5*t.^2;
fplot(f)
  댓글 수: 2
Dyuman Joshi
Dyuman Joshi 2022년 12월 20일
편집: Dyuman Joshi 2022년 12월 20일
Thanks for pointing out. I looked into the documentation of fplot function which is a part of symbolic math toolbox.
Voss
Voss 2022년 12월 20일
Ahh. Makes sense.

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

카테고리

Help CenterFile Exchange에서 Calculus에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by