Code covered by the BSD License

Choi Okos Equation GUI

Freddy Del Pozo Leon (view profile)

Find ThermoPhysical Properties of Foods using the Choi Okos Equation w/ GUI

ProgramaChoiOkos_GUI_Graficas.m
```function [T,rho,k,Cp,alpha]=ProgramaChoiOkos_GUI_Graficas(proteina,...
grasa,carbohidratos,...
fibra,ceniza,agua,T_inicial,delta_T,T_final)
clc
%==========================================================================
p=proteina;
f=grasa;
c=carbohidratos;
fi=fibra;
a=ceniza;
w=agua;
T=[T_inicial:delta_T:T_final];
%==========================================================================
if abs(p+f+c+fi+a+w)~=100
error('Por favor, verifique los porcentajes ingresados')
end
if T == NaN
error('Ingrese un valor de Temperatura')
end
lT=length(T);
%==========================================================================
fracw=zeros(lT,7);
for n=1:lT
Temp=T(1,n);
if Temp<-2
[W,I]=frachieloagua(w,i,p,f,c,fi,a,Temp);
else
W=w;I=0;
end
fracw(n,:)=[p f c fi a W I]./100;
end
FHIELO=fracw(:,7);
FAgua=fracw(:,6);
%==========================================================================
[rho,k,Cp,alpha]=choiokos(T,fracw);
%==========================================================================
if lT==1
fprintf('T[C]=%3.0f, xi=%10.5f, xw=%10.5f\n',T,i,w)
else
savefile = 'ChoiOkos.mat';
save -ascii ChoiOkos.dat T rho k Cp alpha FHIELO FAgua
save(savefile, 'T', 'rho','k','Cp','alpha','FHIELO','FAgua')
%graficaschoiokos(T,rho,k,Cp,alpha,FHIELO,FAgua);
%handles=guidata(hObject);

%set(handles.graficas1,'XMinorTick','on')
%guidata(hObject,handles);
%grid on
end```