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

3 次查看(过去 30 天)
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.

请先登录,再进行评论。

类别

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