Borrar filtros
Borrar filtros

When i saved my code , I am getting this error "Undefined function 'X0' for input arguments of type 'double'". Why is that?

1 visualización (últimos 30 días)
Tb0 =100;
Tvc =110;
% initialisation du débit de la vapeur de chauffage (Mvc) en [kg/s]
x0(5*n+1)=((Uh*Ah)/Ls)*((Tb0-x0(4*n))/log((Tvc-x0(4*n))/(Tvc-Tb0)));

Respuesta aceptada

michio
michio el 4 de Oct. de 2016
x0 in your code is a variable or a function? The error message says that x0 is not defined.
  3 comentarios
michio
michio el 4 de Oct. de 2016
Editada: michio el 4 de Oct. de 2016
Hm, no clue at the moment. Could you provide a sample code that I can actually run in my end and that reproduces the same error?
It would be much easier to help you here.
ahlem sellami
ahlem sellami el 5 de Oct. de 2016
Editada: Jan el 5 de Oct. de 2016
fprintf('* Données de l installation \n');
fprintf('--------------------------- \n');
n=input(' Nombre des étages: n =21 ');
Tb0=input('Température maximale de chauffage de la saumure, [°C]:T0 =100');
Tvc=input('Température de la vapeur de chauffage en [°C]: Ts =110');
% initialisation des inconnues du système d'équations
%initialisation de la température de l'eau à la sortie des condenseurs
% (ti) en [°C]
for i=1:n
x0(4*n+i-1)=Tf+((n+1)-i)*dT1;
end
% initialisation du débit de la vapeur de chauffage (Mvc)
% en [kg/s]
x0(5*n+1)=((Uh*Ah)/Ls)*((Tb0-x0(4*n))/log((Tvc-x0(4*n))/(Tvc-Tb0)));
% initialisation du débit de l'eau d'alimentation (Mf) en [kg/s]
x0(5*n)=(Ls/Cph)*(x0(5*n+1)/(Tb0-x0(4*n)));
Uh, Ah and Ls are data it
Error
Undefined function 'x0' for input arguments of type 'double'.
Error in
x0(5*n+1)=((Uh*Ah)/Ls)*((Tb0-x0(4*n))/log((Tvc-x0(4*n))/(Tvc-Tb0)));

Iniciar sesión para comentar.

Más respuestas (1)

Jan
Jan el 5 de Oct. de 2016
What is "Tf" and "dT1"? Did you notice that in the header of your question the name is "X0" with an uppercase X?

Categorías

Más información sobre Get Started with MATLAB en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by