nav-left cat-right
cat-right
Matthias Pospiech > Articles by: pospiech

fast calculation of functions with two variables

If you come from the programming world of C/C++ or java or any other traditional programming languages you might fall into the trap of using for loops for the calculation of functions. This works as expected but it is much slower than what matlab can do. The following example demonstrates this principle (which you should not use if you can) Data2D = zeros([xPoints yPoints]); for xi = 1:xPoints x =...

plotting a filled curve

A search on how to fill the area under a curve reveals that such questions are quite often asked. Here is the solution in a function file that I created for simplifying filled curve plots using matlabs fill function. function handle = filledcurve(x, y, zero, colorspec)   if (nargin < 3) zero = 0; end   if (nargin < 4) colorspec = 'b'; end     xtemp = [x(1) ;...

fast reading of structured text data with matlab

In the following I present a solution to read data from a textfile which has the number of x-values (columns) in the first line, the number of y-values (rows) in the second line and in all following lines the matrix with size x times y. The principle reading of the data is achieved by the following code % open file display(['reading ' FILENAME]); fid = fopen(FILENAME, 'r'); fseek(fid, 0,...

LaTeX-Vorlage für Protokolle

Neue LaTeX-Vorlage zur Erstellung von Labor-Protokollen:   LaTeXTemplateProtokoll (505,4 KiB) Die Vorlage beruht auf Koma Script (scrartcl) und ist für pdflatex ausgelegt (kein LuaTeX oder XeteX). Unter anderem werden diese Pakete verwendet: inputenc, grffile, fontenc, textcomp, lmodern, babel, xcolor, graphicx, epstopdf, caption, amsmath, siunitx, booktabs, tabularx, setspace, scrpage2, microtype. Anpassungen...

LaTeX Einführung

Im Rahmen eines Workshops der jDPG Hannover wurde der folgende Vortrag zur Einführung in LaTeX gehalten:   LaTeXIntroductionVortrag-2011-05-14.pdf (1,6 MiB)   LaTeXIntroductionHandout-2011-05-14.pdf (1,4 MiB)   Uebungen-2011-05-14.zip (569,9 KiB) Das Publikum bestand aus Physik-Studenten des 2ten Semesters. Der Vortrag und die dazu abgehaltenen Übungen umfassten 4 Stunden. Dieser...
Seite 7 von 28« Erste...56789...20...Letzte »