tp1 : typo
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
function [ y ] = myF( x )
|
||||
y = x;
|
||||
for i=1:50
|
||||
y = sqrt(y);
|
||||
end
|
||||
for i=1:50
|
||||
y = y.*y;
|
||||
end
|
||||
endfunction
|
||||
@@ -0,0 +1,65 @@
|
||||
|
||||
//***************************************************
|
||||
//TP 1
|
||||
//***************************************************
|
||||
//*******************************************************
|
||||
// dérivée numérique
|
||||
//***************************************************
|
||||
|
||||
|
||||
function y=derive(x,f)
|
||||
// TODO
|
||||
endfunction
|
||||
|
||||
|
||||
// le test
|
||||
function y=f(x)
|
||||
y=x^2
|
||||
endfunction
|
||||
|
||||
//***************************************************
|
||||
// tracés de tangentes
|
||||
//**************************************************
|
||||
|
||||
function trace_tangente(f,x0,x)
|
||||
// TODO
|
||||
endfunction
|
||||
|
||||
|
||||
//*********************************************
|
||||
// fonctions hyperboliques
|
||||
//*********************************************
|
||||
|
||||
|
||||
clf
|
||||
x=[-2:0.01:2];
|
||||
y0=sinh(x);
|
||||
y1=asinh(x);
|
||||
plot(x,y0,'-b') // sinh
|
||||
plot(x,y1,'-r') // asinh
|
||||
plot(x,x,'-k') // diagonale
|
||||
xgrid(3) // grille
|
||||
|
||||
|
||||
// cosh et acosh
|
||||
|
||||
//tanh at atanh
|
||||
//****************************************************
|
||||
// fonctions trigonométriques
|
||||
//****************************************************
|
||||
|
||||
//arc tangente
|
||||
clf
|
||||
h=10^(-8)
|
||||
x=[-5:0.01:5];
|
||||
y=atan(x);
|
||||
dy=(atan(x+h)-atan(x))/h;// dérivée numérique
|
||||
subplot(121)
|
||||
plot(x,y,'-b',y,tan(y),'-r',x,x,'-g')
|
||||
xgrid(3)
|
||||
xtitle('$\tan/\arctan$')
|
||||
subplot(122)
|
||||
plot(x,dy,'-b',x,1 ./(1+x^2),'-r')
|
||||
xgrid(3)
|
||||
xtitle("$\arctan''(x)={1\over 1+x^2}$")
|
||||
|
||||
Reference in New Issue
Block a user