diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /75/CH4/EX4.11/ex_11.sce | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '75/CH4/EX4.11/ex_11.sce')
-rwxr-xr-x | 75/CH4/EX4.11/ex_11.sce | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/75/CH4/EX4.11/ex_11.sce b/75/CH4/EX4.11/ex_11.sce new file mode 100755 index 000000000..2ac7242f1 --- /dev/null +++ b/75/CH4/EX4.11/ex_11.sce @@ -0,0 +1,25 @@ + // PG (234) + +deff('[y]=f(x)','y=exp(x)') +x = -1:0.01:1; +// For +n = 1; +x = [-1 0 1]; +E1 = 0.272; +F1 = 1.2715 + 1.1752*x; + +// Relative errors + +x = -1.0; +exp(x) - F1; +r1 = ans(1,1) +x = 0.1614; +exp(x) - F1; +r2 = ans(1,2) +x = 1.0; +exp(x) - F1; +r3 = ans(1,3) + +F3 = 0.994526 + 0.995682*x + 0.543981*x*x + 0.179519*x*x*x; +x = [-1.0 -0.6832 0.0493 0.7324 1.0] +exp(x) - F3 // relative errors
\ No newline at end of file |