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!