fplot is not working

38 次查看(过去 30 天)
rohinesh r
rohinesh r 2020-10-26
syms x
f(x) = sin(x)
fplot(f(x),[-pi/2,pi/2])

回答(1 个)

Cris LaPierre
Cris LaPierre 2020-10-26
编辑:Cris LaPierre 2020-10-26
You are close. The error in line 3 is because f(x) is not the function name. Check in your workspace and you'll see that f is.
syms x
f(x) = sin(x)
f(x) = 
sin(x)
fplot(f,[-pi/2,pi/2])

类别

Help CenterFile Exchange 中查找有关 Formula Manipulation and Simplification 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by