Solutions for FCUP's Numerical Analysis Assignments

This commit is contained in:
Diogo Cordeiro
2019-08-28 16:44:59 +01:00
commit b7b704b68b
108 changed files with 35323 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
#!/usr/bin/gnuplot
set output "err_fixed_point.png";
set terminal png size 1200,900 enhanced font "Helvetica,20"
set autoscale;
set logscale x;
set xlabel "Erro"
set ylabel "Iterações"
set xrange [] reverse;
set linetype 1 lc rgb 'black'
set linetype 2 lc rgb 'black
plot "err_fixed_point.txt" with points pointtype 1 pointsize 2 lw 4 t "Fixed Point", "err_newton.txt" with points pointtype 2 pointsize 2 lw 4 t "Newton";
set terminal png size 1200,900 enhanced font "Helvetica,35"
set output "graph.png";
unset logscale x;
set xr [-1:1];
set zeroaxis ls 1 lw 3;
set xlabel "x"
set ylabel "y"
f(x)= x**2 - cos(x)**2;
plot f(x) lw 3 t "x^2 - cos(x)^2";
set output "graph_small.png";
set xr [0.7:0.8];
plot f(x) lw 3 t "x^2 - cos(x)^2";