- #1
phynewb
- 13
- 0
Hi guys
I am new to matlab. I have a question in how to pick up matrix elements as a output of a function.
For each E, test(E) will generate a 2x3 matrix.
I wonder how to pick up the matrix element,say test(2)(1,3).
When I type test(2)(1,3), it shows
? Error: ()-indexing must appear last in an index expression.
So how can I pick up the matrix element?
Thank you.
I am new to matlab. I have a question in how to pick up matrix elements as a output of a function.
Code:
function result=test(E)
result=[1,2,3;4,5,6]*E;
For each E, test(E) will generate a 2x3 matrix.
I wonder how to pick up the matrix element,say test(2)(1,3).
When I type test(2)(1,3), it shows
? Error: ()-indexing must appear last in an index expression.
So how can I pick up the matrix element?
Thank you.