Not enough input arguments when trying to plot function.
显示 更早的评论
I'm trying to plot a function which I created on editor, but am having trouble doing so. This is the function file I created on editor:
function z=f(y);
global B C D Tr c4 Beta gamma
z= (1 + B./y + C./(y.^2) + D./(y.^5) + c4./(Tr.^3*y.^2).*(Beta + gamma./(y.^2)).*exp( gamma./(y.^2)));
end
The values for the variables B, C, D, Tr, c4, Beta, and gamma have already been saved onto my workspace. The function itself works when I type f(y), where y is any number, into the command window. The problem is, every time I try to use the ezplot function to plot a graph of "f", I get an error which states:
Error using f (line 3)
Not enough input arguments.
Can anyone here please help me plot this function?
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Networks 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!