a=[[1,3]]b=@[4,2]b(1,*)=abWhy b is not a matrix?a=[[1,3],[2,4]]b=@[4,2]b(1..2,*)=abAnd this way , that b is a matrix!Can you tell why?
The way to do that is this:ExampleThe " * " is not necessary and the first one doesn't work because the first row of a matrix is a vector not another matrix, so if "a" is a matrix it gives a matrix with the first row another matrix. For the second since you are inserting two rows at the same time, that's correctly a 2x2 matrix and not a vector.
Thanks for your reply!Now I know how it works.However there is something another puzzled me,Is there another way to transfer [[1,3]] to [1,3] Except the way that a=[[1,3]],a(1)?MS is more complicated than Matlab!
Yes, there is another way, you can use "Flatten(a)", that converts a matrix into a vector.We are pleased to help you if you have more questions!
Thank you very much!I hope MS will become better and better!