How do I plot a symbolic function of one variable for a specific set of argument values?
2 次查看(过去 30 天)
显示 更早的评论
Say, I have a symbolic function y(x). There is no support for plotting it when x=logspace(1, 5, 101) in fplot(). How do I do it nicely?
0 个评论
回答(1 个)
Walter Roberson
2021-5-30
syms y(x)
y(x) = cos(x) * exp(-x/10)
fplot(y, [10 100])
title('fplot')
X = logspace(1, 2, 101);
Y = double(subs(y, x, X));
plot(X, Y)
title('subs')
3 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Calculus 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!