In this lab the error between analytical and numerical derivative is investigated.
Used functions:
Formulas for numerical derivatives as they are mentioned in the code:
The errors are computing for the next and :
After building and installing you can run lab1
using combination of the following options:
- just
lab1
- compute errors and plot graphs in several windows lab1 -o 'output-type'
- determine plot output type, can bejpg
,png
orwindow
,window
is defaultlab1 -v
orlab1 --verbose
- enable verbose logging, can be useful for debugginglab1 -size 'width'x'height'
- set plotting image size,'width'
and'height'
must be unsigned integers,1600x900
is defaultlab1 --nonlinear
- plot with y-axis logarithmic scalelab1 --dump-data
- dump errors data to .txt files into output directorylab1 -od 'outdir'
- change output directory to'outdir'
,'outdir'
should be already created directory,output/
is defaultlab1 -q
- if output type iswindow
don't plot graphs (quiet run)