How to plot both functions in one plot?
显示 更早的评论
f = inline('sin(x/2)')
g = @(y) 2*cos(y)
3 个评论
Rik
2019-1-12
My two questions are:
- Why are you using an inline function?
- What have you tried yourself?
Shraddha Pandey
2019-1-14
Walter Roberson
2019-1-14
your f and g assignment are not being used.
回答(1 个)
madhan ravi
2019-1-13
syms x y
fplot(sin(x/2))
hold on
fplot(2*cos(y))
help fplot
2 个评论
Shraddha Pandey
2019-1-14
madhan ravi
2019-1-14
Looks like you solved the problem by your comment above? Did you read the documentation of fplot?? It belongs to symbolic math toolbox used to define variables symbolically.
类别
在 帮助中心 和 File Exchange 中查找有关 Plot Settings 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!