Info
此问题已关闭。 请重新打开它进行编辑或回答。
Hey guys, I just started using matlab. Why is this showing as the function being undefined
1 次查看(过去 30 天)
显示 更早的评论
回答(2 个)
Walter Roberson
2017-5-21
Notice that at the top it still says "Untitled". You have not saved your code into my_equation.m . Also, my_equation compared to myequation matters.
4 个评论
EngEdgarHS
2017-5-21
1º Try this:
function [x] = myequation(a, b, c)
top = sqrt(b-4*a);
botton = c^7;
x = (b+top)/botton;
2º Save your code in appropriated directory with same name of function (myequation.m)
3º Select folder where myequation.m is saved and try this:
x = myequation(1,2,3);
Regardles.
0 个评论
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!