Undefined function 'Qc' for input arguments of type 'double'. What's wrong with my function?

Not sure what's happening here. I was checking documentation for a while and can't seem to find a solution. Here is my function:
function Q = heatc(c1,m1,t1,t2)
Q = c1.*m1.*(t2-t1);
end
Then when I call it I get the following error:
EDU>> y = heatc(4190,0.185,20,100)
Undefined function 'heatc' for input arguments of type 'double'.
Not sure what's up, isn't every variable automatically of type floating point double.

댓글 수: 2

A. Did you name the file containing the source heatc.m?
B. Remember that Matlab is case-sensitive while the OS may or may not be.
C. Is the subdirectory in which you created the m-file on the Matlab search path?
are the most obvious causes to investigate first.
Issue was C. Thought I was in the search path. Thanks.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터File Exchange에서 File Operations에 대해 자세히 알아보기

태그

질문:

2013년 12월 4일

댓글:

2013년 12월 4일

Community Treasure Hunt

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

Start Hunting!

Translated by