π
<-

## analyse_num

### Hierarchy of files

 Downloads Files created online (25899) TI-Nspire (20034) mViewer GX Creator Lua (14396)

LicenceLicense : Non spécifiée / IncluseUnspecified / Included

Vote :

### Informations

Catégorie :Category: mViewer GX Creator Lua TI-Nspire
Auteur Author: Naiirock
Type : Classeur 3.6
Page(s) : 2
Taille Size: 60.12 Ko KB
Mis en ligne Uploaded: 14/01/2021 - 14:49:03
Visibilité Visibility: Archive publique

### Description

TP : Traitement de données expérimentales.
Exercice 1 :
clear all;
clc;
%% EXO 1
x = [-1 0 1 3];
y = [0 -1 0 70];

%% interpolation de Lagrange
n = length(x);
X = -1:0.1:3.5; %% 2, 3 et 3.5

P=0;
for k=1:n
L = 1;
for i=1:n
if i~=k
L = L.*(X-x(i))/(x(k)-x(i));
end
end
P = P+y(k)*L;

end

P(X==2) %% en x=2
P(X==3) %% en x=3
P(X==3.5) %% en x=3.5
plot(x,y,'*')
hold on
plot(X(:),P(:),'r')

Exercice 2 :
function alpha = calculcoef(x,y)

if length(x)==2
alpha = (y(2)-y(1))/(x(2)-x(1));
else
alpha1 = (calculcoef(x(2:end),y(2:end))-calculcoef(x(1:end-1),y(1:end-1)));
alpha = alpha1/(x(end)-x(1));
end

clear all;
clc;

%% Exercice 1
x = [0 pi/4 pi/2 3*pi/4 pi];
y = sin(x);

X = ((0:0.01:1)*pi)';
e(:,1) = ones(length(X),1);
p = y(1)*ones(length(X),1);

for k = 2:length(x)
e(:,k) = e(:,k-1).*(X-x(k-1));
p = p + e(:,k)*calculcoef(x(1:k),y(1:k));
end

figure
plot(x,y,'*')
hold on
plot(X,p,'r')
hold off
Exercice 3 :
clear all;
clc;

%%
X = [1,2,3,4,5]';
Y = [2,3,3.2,3.5,2.5]';
figure;
plot(X,Y,'*')
%parabole passant par 0 : y=ax^2 + bx
%on cherche a et b
T =[X.^2,X];

AB = inv(T'*T)*T'*Y;
a = AB(1);
b = AB(2);
x = 0:0.01:5;
f = a*x.^2 + b*x;

hold on
plot(x,f,'r')
Angle = atan(b)*180/pi

### Archive contentsContenu de l'archive

Action(s) SizeTaille FileFichier
62.99 Ko KB analyse_num.tns

-
Search
-
Social
-
Featured topics
1234
-
For more contests, prizes, reviews, helping us pay the server and domains...

Discover the the advantages of a donor account !

-
Stats.
737 utilisateurs:
>717 invités
>13 membres
>7 robots
Record simultané (sur 6 mois):
6892 utilisateurs (le 07/06/2017)

-
Other interesting websites
Texas Instruments Education
Global | France
(English / Français)
Banque de programmes TI
ticalc.org
(English)
La communauté TI-82
tout82.free.fr
(Français)