Matlab path and undefined function

8 visualizaciones (últimos 30 días)
Nimco
Nimco el 14 de Ag. de 2012
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 comentarios
Matt Fig
Matt Fig el 15 de Ag. de 2012
Why not just delete one of these?

Iniciar sesión para comentar.

Respuestas (1)

Wayne King
Wayne King el 14 de Ag. de 2012
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 comentario
Matt Fig
Matt Fig el 15 de Ag. de 2012
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?

Iniciar sesión para comentar.

Categorías

Más información sobre Environment and Settings en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by