Matlab disable warnings: doesn't support 'local' arg

Use something that works in both Octave and Matlab
fix octave-specific code

must try to remember that assert() only takes a logical on Matlab
Matlab: workaround for issue #107