Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
basic fitting

Subject: basic fitting

From: nouha

Date: 19 Apr, 2011 13:57:05

Message: 1 of 1

hay;
my problem today is how can I fit multiple data sets with basic fitting for this program

clc
clear
% activité de l'eau%
a=[0.10, 0.17, 0.20, 0.25, 0.31, 0.36, 0.42, 0.46, 0.52, 0.57, 0.63, 0.70, 0.75, 0.80, 0.85, 0.90,0.95];

% nombre de micromoles d'eau adsorbée par gramme d'alumine(mmol/g)%
N=[1.85, 2.73, 3.13, 3.70, 4.50, 5.11, 5.80, 6.55, 7.47, 8.55, 9.50, 11.2, 12.00, 13.37, 15.38, 16.20, 17.6];
M=N*0.001;%(mol/g)%
O=sum(M);

%constante du gaz parfait kJ/mol K%
R=8.314*0.001;

%température K%
T=303.2;

%enthalpie libre différentielle pour une mole d'eau adsorbée kJ/mol%
deltaGR=R.*T.*log(a);

%enthalpie isostèrique par mole d'eau kJ/mol%
deltaHis=[-21.4, -18.0, -17.0, -15.9, -14.6, -13.0, -12.1, -11.3, -9.6, -7.5, -4.18, -1.9, -1.9, -1.9, -1.9, -1.9, -1.9];
y=O.*deltaHis; %kJ/g%


%enthalpie d'adsorption différentielle par mole d'eau kJ/mol%
deltaHR=-(gradient (y)./gradient (M));

%entropie différentielle d'adsorption%
deltaSR=1000*((1/T)*(deltaHR-deltaGR));
J=(T/1000).*deltaSR;
            

Z=0:0:20;
figure(2);
s=interp1(N,deltaGR,Z,'cubic');
d=interp1(N,deltaHR,Z,'cubic');
h=interp1(N,J,Z,'cubic');
hold on
plot(N,deltaGR,'*b',Z,s)
plot(N,deltaHR,'*r',Z,d)
plot(N,J,'*g',Z,h)
xlabel('N ,(µmol/g)'),ylabel('(kJ/mol)')
grid on

please help me.

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us