Effacer les filtres
Effacer les filtres

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

1 vue (au cours des 30 derniers jours)
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)));

Réponse acceptée

michio
michio le 4 Oct 2016
x0 in your code is a variable or a function? The error message says that x0 is not defined.
  3 commentaires
michio
michio le 4 Oct 2016
Modifié(e) : michio le 4 Oct 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 le 5 Oct 2016
Modifié(e) : Jan le 5 Oct 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)));

Connectez-vous pour commenter.

Plus de réponses (1)

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

Catégories

En savoir plus sur Get Started with MATLAB dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by