Académique Documents
Professionnel Documents
Culture Documents
clc
clear all
syms tau1 tau2
datos =[0 0
1 4.682436
2 8.744961
3 12.82542
4 14.69022
5 16.71238
6 17.48221
7 17.92025
8 18.19075
9 18.23363
10 18.20436];
t=datos(:,1);
h=datos(:,2);
plot(t,h,'o','linewidth',3)
K=0.0022775;
M=8000;
A1=400; %cm2
diam2=20;
h1ss=8.00;
h2ss=18.22;
e=0;
for i = 1:length(datos)
hest(i) = K*M*(1-((tau1*exp(-t(i)/tau1))-tau2*exp(-t(i)/tau2))/(tau1-
tau2));
e = e+(h(i)-hest(i))^2;
end
grad_e = transpose(jacobian(e,[tau1,tau2]));
hess_e = jacobian(grad_e,[tau1,tau2]);
x0 = [3.574;0.1052];
error=1;
tt=0:1:11;
hh=K*M*(1-((tau1*exp(-tt/tau1))-tau2*exp(-tt/tau2))/(tau1-tau2));
hold on
plot (tt,hh,'c-', 'LineWidth',2)