Plotting a function inside a m-file?
1 次查看(过去 30 天)
显示 更早的评论
I ran A3.m but it doesn't seem to create a correct plot.
0 个评论
采纳的回答
Razvan
2012-10-10
Function f2 returns only a number... Probably you want a vector, with one element for each element of x. In this case use
function F = f2(x)
F = 2*(x.^4)-3*(x.^2)+x-7;
end
0 个评论
更多回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Exploration 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!