Got Questions? Get Answers.
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:
polynomial model of the first degree

Subject: polynomial model of the first degree

From: nouha

Date: 21 Mar, 2011 10:36:05

Message: 1 of 2

my problem is how can I solve a polynomial model of the first degree through MATLAB.
the theorical expression is:
Y=A0+A1*W1+A2*W2+A3*W3+A4*W4+A5*W5+A6*W6+A7*W7
the problem is how can I find thi coefficient A
the experimental resulat (Yexp) is given in this program:
clc
% nombre de micromoles d'eau adsorbée par gramme de quartz(µmol/g)%
N=[26, 40.4, 49.6, 56.4, 62.1, 67.4, 72.4, 77.3, 82.2, 87.2, 92.5, 98.1, 104, 110.8, 118.5, 125.5, 138.5, 153, 178.8, 210.6];
M=0.000001*N; % mol/g %
%fraction molaire d'oxygène liè à l'eau par rapport au nombre total d'oxygène engagè dans la réaction d'asorption de N moles d'eau%
X=(M.*(6.023e+23))./((M.*(6.023e+23))+(7.122*(1.0e+19)));
% activité de l'eau%
a=[0.01, 0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95];
%constante du gaz parfait J/mol K%
R=8.314;
%température K%
T=304.15;
Y=(R*T).*((log(a)-log(X))./((1-X).^2))
for i=1:7
W=(((2.*X(i))-1).^(i-1)).*((2*(i+1).*X(i))-1)
end
Y was the experimental resulat
W was the fraction
thanks

Subject: polynomial model of the first degree

From: Torsten

Date: 21 Mar, 2011 11:10:39

Message: 2 of 2

On 21 Mrz., 11:36, "nouha " <no...@voila.fr> wrote:
> my problem is how can I solve a polynomial model of the first degree through MATLAB.
> the theorical expression is:
> Y=A0+A1*W1+A2*W2+A3*W3+A4*W4+A5*W5+A6*W6+A7*W7
> the problem is how can I find thi coefficient A
> the experimental resulat (Yexp) is given in this program:
> clc
> % nombre de micromoles d'eau adsorbée par gramme de quartz(µmol/g)%
> N=[26, 40.4, 49.6, 56.4, 62.1, 67.4, 72.4, 77.3, 82.2, 87.2, 92.5, 98.1, 104, 110.8, 118.5, 125.5, 138.5, 153, 178.8, 210.6];
> M=0.000001*N; % mol/g %
> %fraction molaire d'oxygène liè à l'eau par rapport au nombre total d'oxygène engagè dans la réaction d'asorption de N moles d'eau%
> X=(M.*(6.023e+23))./((M.*(6.023e+23))+(7.122*(1.0e+19)));
> % activité de l'eau%
> a=[0.01, 0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95];
> %constante du gaz parfait J/mol K%
> R=8.314;
> %température K%
> T=304.15;
> Y=(R*T).*((log(a)-log(X))./((1-X).^2))
> for i=1:7
> W=(((2.*X(i))-1).^(i-1)).*((2*(i+1).*X(i))-1)
> end
> Y was the experimental resulat
> W was the fraction
> thanks

Form an (nx8) matrix W with rows
[1,w_11,w_12,...,w_17],
[1,w_21,w_22,...,w_27]
...
[1,w_n1,w_n2,...,w_n7]
(row i contains the values of the independent variables of the i-th
experiment)
and an (nx1) vector y with elements
[y_1,y_2,...,y_n]
Then
A = W\y
gives you the coefficient vector A=[A0,A1,...,A7].

Best wishes
Torsten.

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