Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

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

조회 수: 1 (최근 30일)

답변 (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

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