Azzera filtri
Azzera filtri

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

1 visualizzazione (ultimi 30 giorni)
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)));

Risposta accettata

michio
michio il 4 Ott 2016
x0 in your code is a variable or a function? The error message says that x0 is not defined.
  3 Commenti
michio
michio il 4 Ott 2016
Modificato: michio il 4 Ott 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 il 5 Ott 2016
Modificato: Jan il 5 Ott 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)));

Accedi per commentare.

Più risposte (1)

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

Categorie

Scopri di più su Get Started with MATLAB in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by