diff options
author | Andreas Müller <andreas.mueller@ost.ch> | 2022-05-08 22:37:45 +0200 |
---|---|---|
committer | Andreas Müller <andreas.mueller@ost.ch> | 2022-05-08 22:37:45 +0200 |
commit | a866d7cd6672474e9376617aadc91424b9ba3506 (patch) | |
tree | 68e4969e2f70cc3e4386ed351e6328aca3ec3851 /vorlesungen/slides/fresnel/eulerspirale.m | |
parent | remove template paper (diff) | |
download | SeminarSpezielleFunktionen-a866d7cd6672474e9376617aadc91424b9ba3506.tar.gz SeminarSpezielleFunktionen-a866d7cd6672474e9376617aadc91424b9ba3506.zip |
add Fresnel presentation
Diffstat (limited to '')
-rw-r--r-- | vorlesungen/slides/fresnel/eulerspirale.m | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/vorlesungen/slides/fresnel/eulerspirale.m b/vorlesungen/slides/fresnel/eulerspirale.m new file mode 100644 index 0000000..312541a --- /dev/null +++ b/vorlesungen/slides/fresnel/eulerspirale.m @@ -0,0 +1,34 @@ +# +# eulerspirale.m +# +# (c) 2022 Prof Dr Andreas Müller, OST Ostschweizer Fachhochschlue +# +global n; +n = 10000; +global tmax; +tmax = 10; + +function retval = f(x, t) + retval = [ cos(t*t); sin(t*t) ]; +endfunction + +x0 = [ 0; 0 ]; +t = tmax * (0:n) / n; + +c = lsode(@f, x0, t); + +fn = fopen("eulerpath.tex", "w"); + +fprintf(fn, "\\def\\fresnela{ (0,0)"); +for i = (2:n) + fprintf(fn, "\n\t-- (%.4f,%.4f)", c(i,1), c(i,2)); +end +fprintf(fn, "\n}\n"); + +fprintf(fn, "\\def\\fresnelb{ (0,0)"); +for i = (2:n) + fprintf(fn, "\n\t-- (%.4f,%.4f)", -c(i,1), -c(i,2)); +end +fprintf(fn, "\n}\n"); + +fclose(fn); |