Mercurial > repos > public > sbplib
annotate isAnyOf.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 | 75f9b7a80f28 |
children |
rev | line source |
---|---|
583
75f9b7a80f28
Allow more than one type in type assertion
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
1 % Returns true of obj is any of he types in the cell array types |
75f9b7a80f28
Allow more than one type in type assertion
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
2 % b = isAnyOf(obj, types) |
75f9b7a80f28
Allow more than one type in type assertion
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
3 function b = isAnyOf(obj, types) |
75f9b7a80f28
Allow more than one type in type assertion
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
4 for i = 1:length(types) |
75f9b7a80f28
Allow more than one type in type assertion
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
5 if isa(obj, types{i}); |
75f9b7a80f28
Allow more than one type in type assertion
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
6 b = true; |
75f9b7a80f28
Allow more than one type in type assertion
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
7 return |
75f9b7a80f28
Allow more than one type in type assertion
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
8 end |
75f9b7a80f28
Allow more than one type in type assertion
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
9 end |
75f9b7a80f28
Allow more than one type in type assertion
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
10 b = false; |
75f9b7a80f28
Allow more than one type in type assertion
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
11 end |