Matlab path and undefined function

6 ビュー (過去 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 件のコメント
Walter Roberson
Walter Roberson 2012 年 8 月 15 日
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 Center および File ExchangeEnvironment and Settings についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by