Thanks, you were right on the money--I had defined my own diff function! I'm impressed!
On Fri, Mar 08, 2019 at 17:54:06 -0500, Benjamin Grange wrote:
> Suddenly after working ok, both of these functions are returning the same
> For instance,
> >> int2str(1)
> error: horizontal dimensions mismatch (1x1 vs 4x4)
> error: called from
> ostrsplit at line 90 column 15
> int2str at line 93 column 10
> Any ideas???
> I'm running Octave 4.2.2 on Ubuntu Bionic.
This works fine for me in Octave 4.2.2. It's possible that you have a
local function or configuration that is changing something. Octave uses
a single global namespace, so if you create a local function "diff" for
example, it can change or break internal behavior.
If you use the Octave debugger you may be able to figure out what's
changed for you. Try following these steps and report what you see.
dbstop ostrsplit 90
You should now see a "debug>" prompt. Run the following to see what's
going on inside of ostrsplit.
tmp = [idx(1)-1, diff(idx)-1, numel(s)-idx(end)]