Matlab path and undefined function

조회 수: 7 (최근 30일)
Nimco
Nimco 2012년 8월 14일
Hi
I have tried several times to set Matlab path, my work is saved in the Matlab folder and I have added this folder and saved. File -> Set Path... -> Add Folder... -> Save. When I type >>addpath 'c:\mfiles' in the command space I get a message Warning: Name is nonexistent or not a directory: c:\mfiles.
I am still getting the error message
??? Input argument "y" is undefined.
Error in ==> trombe11 at 14
Tf1 =((y-b)-s1/Uc)*exp(-Ac*Uc*F/(m*cp))+(b+s1/Uc);
My mfile program:
function [dy] = trombe11(t,y )
Ac=0.2014;
Ar=2.2;
Aw=0.32;
Uc=3.1;
Uw=5.68;
Ut=1.03;
rho=1.23;
m =0.01353;
cp=1.003;
F=0.83;
b=8;
s1=15.68;
Tf1 =((y-b)-s1/Uc)*exp(-Ac*Uc*F/(m*cp))+(b+s1/Uc);
dy(1)=((Tf1-y)*0.011)/3.96 -((Ut*Ar+Uw*Aw)*(y-b)/(rho*cp*3.96));
Any help will be much appreciated.
  댓글 수: 3
Matt Fig
Matt Fig 2012년 8월 15일
Why not just delete one of these?

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

답변 (1개)

Wayne King
Wayne King 2012년 8월 14일
I was the one who answered your other post
You should not start a new thread. This the same question.
I just used 'c:\mfiles' as an example. I don't know your computer and I have no idea where you have saved trombe11.m
If you enter
>>which trombe11
at the command line what is returned?
  댓글 수: 1
Matt Fig
Matt Fig 2012년 8월 15일
If the OP is getting that error, finding trombe11 is not the problem. Calling it is.
So, to the OP: How are you calling this function and did you show the entire error message?

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

카테고리

Help CenterFile Exchange에서 Environment and Settings에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by