Plotting of an inline function
9 次查看(过去 30 天)
显示 更早的评论
str=input('Give an equation in x\n','s');
f=inline(str,'x');
I want to plot a graph of the function 'f'. I tried fplot but it is not working. How can I plot 'f' vs. 'x'.
回答(2 个)
Star Strider
2018-8-31
See: how do you user input a equation in matlab ? i used inline function but unable to plot the equation. suppose i want my input equation as x-cos(x). and than plot it. how do i do it? Is the following code correct ? (link). This seems to be the same homework problem!
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Function Creation 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
