필터 지우기
필터 지우기

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

조회 수: 1 (최근 30일)
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)));

채택된 답변

michio
michio 2016년 10월 4일
x0 in your code is a variable or a function? The error message says that x0 is not defined.
  댓글 수: 3
michio
michio 2016년 10월 4일
편집: michio 2016년 10월 4일
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 2016년 10월 5일
편집: Jan 2016년 10월 5일
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)));

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

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

카테고리

Help CenterFile Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by