フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

Hey guys, I just started using matlab. Why is this showing as the function being undefined

1 回表示 (過去 30 日間)
German Bu
German Bu 2017 年 5 月 21 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日

回答 (2 件)

Walter Roberson
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 件のコメント
German Bu
German Bu 2017 年 5 月 21 日
I believe so, I saved it into a folder where I have saved mathlab files before
Walter Roberson
Walter Roberson 2017 年 5 月 21 日
What does
which -all my_equation
show?

EngEdgarHS
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.

この質問は閉じられています。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by