Mercurial > repos > public > sbplib
view +blockmatrix/isDivision.m @ 889:f5e14e5986b5 feature/timesteppers
Remove getState from TimeStepper and derived classes
- Currently no need for that functionality. Remove it.
author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
---|---|
date | Thu, 15 Nov 2018 17:29:30 -0800 |
parents | a5f1b0267dba |
children |
line wrap: on
line source
function b = isDivision(div) % Make sure it is a cellarray if ~iscell(div) b = false; return end % Make sure it has the right shape if numel(div) ~= 2 b = false; return end if ~isDivisionVector(div{1}) || ~isDivisionVector(div{2}) b = false; return end b = true; end function b = isDivisionVector(v) if isempty(v) b = true; return end if any(v < 0) b = false; return end b = true; end