Invalid Matrix TokenHi. I didn't find anything about this beside <https://community.jmp.com/t5/Discussions/invalid-matrix-token/td-p/2111> (a terribly formatted post) and nothing in the Scripting Index. What is an "invalid matrix token" error? What does it mean?
When I try to instantiate a matrix in my script like
m = [i j];
where and are numerical variables, it throws the error and points at i.
I think that's all the context I can give. Let me know if any clarification specifically is in order, I can try to help you help me.
Cheers,
Mike
ScriptingRe: Invalid Matrix TokenCannot exactly explain the error message. Most likely related to this Construct Matrices and in the end:
Construct Matrices from Expressions
To construct matrices from expressions, use Matrix(). Elements must be expressions that resolve to numbers.
Names Default To Here(1);
i = 1;
k = 1;
m = Matrix({{i, k}}); //[1 1]
Re: Invalid Matrix TokenThanks, @jthi. That works!
Can you comment briefly on dimensionality? I think I figured it out, {{}{}} is a 2x0, but I don't know how to make a 0x2.
Mike
Re: Invalid Matrix TokenPlay around with this example:
Names Default To Here(1);
i = 1;
k = 1;
m1 = Matrix({{i, k}}); //(1x2)
m2 = Matrix({{i}, {k}}); //(2x1)
Show(m1, m2);and check the Construct Matrices From Lists from the link I provided earlier.
Re: Invalid Matrix TokenI am having trouble concatenating using Concat() or |/ my starting array and additional elements. When I Write() the output, it is equivalent to the starting array, nothing was concatenated (result is [0 0]).