24.10.2014 Views

Approssimazione dell'esponenziale

Approssimazione dell'esponenziale

Approssimazione dell'esponenziale

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

ERRORE_RELATIVO_1=ERRORE_RELATIVO; EXP_APP_1=EXP_APP; Nserie_1=Nserie;<br />

clear ERRORE_RELATIVO EXP_APP Nserie<br />

whos<br />

Name Size Bytes Class<br />

ERRORE_RELATIVO_1 1x1000 8000 double array<br />

EXP_APP_1 1x1000 8000 double array<br />

Nserie_1 1x1000 8000 double array<br />

XCAMPIO 1x1000 8000 double array<br />

Y_ESATTA 1x1000 8000 double array<br />

Grand total is 5000 elements using 40000 bytes<br />

esponenziale_2<br />

Estremo sinistro intervallo di campionamento=-10<br />

Estremo destro intervallo di campionamento=10<br />

Numero di campionamenti=1000<br />

whos<br />

ERRORE_RELATIVO 1x1000 8000 double array<br />

ERRORE_RELATIVO_1 1x1000 8000 double array<br />

EXP_APP 1x1000 8000 double array<br />

EXP_APP_1 1x1000 8000 double array<br />

Nserie 1x1000 8000 double array<br />

Nserie_1 1x1000 8000 double array<br />

XCAMPIO 1x1000 8000 double array<br />

Y_ESATTA 1x1000 8000 double array<br />

f7=figure; figure(f7)<br />

plot(XCAMPIO,EXP_APP,XCAMPIO,Y_ESATTA)<br />

xlabel(’Valore di x’), ylabel(’Valore esatto e approssimato di exp(x)’)<br />

title(’Calcolo exp(x) con funzione di libreria matlab e con funzione esponenziale<br />

taylor 2’) legend(’valore approssimato’,’valore esatto’)<br />

print -depsc2 exp_7<br />

Calcolo exp(x) con funzione di libreria matlab e con funzione esponenziale taylor 2<br />

2.5 x 104 Valore di x<br />

valore approssimato<br />

valore esatto<br />

2<br />

Valore esatto e approssimato di exp(x)<br />

1.5<br />

1<br />

0.5<br />

0<br />

−10 −8 −6 −4 −2 0 2 4 6 8 10<br />

Figura 7: exp 7<br />

5

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!