Mercurial > repos > public > sbplib
annotate +draw/labelPoint.m @ 888:8732d6bd9890 feature/timesteppers
Add general Runge-Kutta class
- Add a general Runge-Kutta class which time integrates the solution based on coefficients obtained from a Butcher tableau
- Add butcher tableau which returns coefficents for the specified Runge-Kutta method
- Remove RungKutta4proper, since obsolete
author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
---|---|
date | Thu, 15 Nov 2018 17:10:01 -0800 |
parents | 48b6fb693025 |
children |
rev | line source |
---|---|
0 | 1 % Takes a variable number of points as inputs and plots them with a label to the current figure. |
2 % label_pt(p) | |
3 function label_pt(varargin) | |
4 for i = 1:length(varargin) | |
5 try | |
6 placelabel(varargin{i},inputname(i)); | |
7 catch e | |
8 error('Could not place label for input %d, ''%s''. Not a valid point',i,inputname(i)) | |
9 end | |
10 end | |
11 end | |
12 | |
13 function placelabel(pt,str) | |
14 x = pt(1); | |
15 y = pt(2); | |
16 h = line(x,y); | |
17 h.Marker = '.'; | |
18 h = text(x,y,str); | |
19 h.HorizontalAlignment = 'center'; | |
20 h.VerticalAlignment = 'bottom'; | |
21 end |