Reputation: 31
When I execute the following code
pkg load symbolic
syms a
A = [1,1,1,2;-1,0,-1,-1; -1,0,-2,-3; 1, 0, 1 ,a];
I receive the following error:
ex12_1 error: octave_base_value::map_value(): wrong type argument 'scalar' error: called from ex12_1 at line 6 column 3
Upvotes: 1
Views: 5500
Reputation: 19689
This is a known bug. See bug#45423 and bug#42152.
The workaround is also suggested in the bug report which is to enclose each row in a square bracket. i.e.
A = [[ 1, 1, 1, 2];
[-1, 0, -1, -1];
[-1, 0, -2, -3];
[ 1, 0, 1, a]];
I have tested it to work on Octave v4.2.1, OctSymPy v2.6.0.
Upvotes: 4