Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

Matrix dimensions must agree

1 vue (au cours des 30 derniers jours)
AYDOGAN CAK
AYDOGAN CAK le 25 Avr 2019
Clôturé : MATLAB Answer Bot le 20 Août 2021
Error in TEZ2>HESAPLA_Callback (line 546)
Pg=(exp((77.3455+(0.0057*(273+T1)))-(7235/(273+T1)))/((273+T1)^8.2))/1000;
Error in gui_mainfcn (line 95)
feval(varargin{:});
Error in TEZ2 (line 42)
gui_mainfcn(gui_State, varargin{:});
When I run the Calculate button in the GUI interface with I'm getting such errors when I don't enter values in edits .What should i ?
Part of my codes:
function HESAPLA_Callback(hObject, eventdata, handles)
msgbox('Sonuçlar için ilgili değerleri giriniz, girdiyseniz bu mesajı dikkate almayınız.')
%Ekserji No.1
m1=str2num(get(handles.m1,'String'));%havanın giriş debisi
T1=str2num(get(handles.T1,'String'));%havanın giriş sıcaklığı
P1=str2num(get(handles.P1,'String'));%havanın giriş basıncı(atmosfer basıncı)
Q1=str2num(get(handles.Q1,'String'));%havanın nemini yüzdesel olarak giriniz.
Cpa=1.005;
Cpv=1.84;
T0=293;
Ra=0.287;
Rv=0.4615;
P0=101.325;
W0=0.0072457;
Q=Q1/100;
Pg=(exp((77.3455+(0.0057*(273+T1)))-(7235/(273+T1)))/((273+T1)^8.2))/1000;
Pv=(Q*Pg);
W=(0.622*Pv)/(P1-Pv);
Ea=((Cpa+(W*Cpv))*((T1+273)-T0))-(T0*(((Cpa+(Cpv*W))*log((T1+273)/T0))-((Ra+(Rv*W))*log(P1/P0))))+(T0*(((Ra+(W*Rv))*log((1+(1.6078*W0))/(1+(1.6078*W))))+(1.6078*Ra*W*log(W/W0))));
E1=m1*Ea;
set(handles.E1,'String',E1);
%Ekserji No.2(Kömür)
m2=str2num(get(handles.m2,'String'));%kömürün giriş debisi
hfg=str2num(get(handles.hfg,'String'));%termodinamik tablolarından kömürün giriş sıcaklığına göre su buharının entalpisi(hfg)
Q2=str2num(get(handles.Q2,'String'));%kömürün nemini yüzdesel olarak giriniz.Örneğin:%60 ise 0.6 yazınız.
B=1.1226;
Hu=6800;
ysu=Q2/100;
yS2=0.027;
yk=0.0743;
Ey=B*(Hu*4.18+hfg*ysu)+(9683*yS2)+(22000*yk)+(340*ysu);
E2=m2*Ey;
set(handles.E2,'String',E2);
  1 commentaire
Adam
Adam le 25 Avr 2019
What do you expect to happen if you press the Calculate button without having entered values in your edit boxes since you algorithm uses those? Do you have default values you expect to be used? Or just don't allow the calculation to progress if they haven't been filled in if this is not a valid situation.

Réponses (0)

Cette question est clôturée.

Community Treasure Hunt

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

Start Hunting!

Translated by