Hi guys(adsbygoogle = window.adsbygoogle || []).push({});

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.Code (Text):function result=test(E)

result=[1,2,3;4,5,6]*E;

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.

**Physics Forums - The Fusion of Science and Community**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Matrix as an output of a function

Loading...

Similar Threads for Matrix output function |
---|

Mathematica Complex output from a real integral |

Mathematica Storing Mathematica output |

Mathematica Summing matrix components |

Mathematica DSolve output with unexpected parameters |

Mathematica Eigenvectors 4x4 Matrix in Mathematica |

**Physics Forums - The Fusion of Science and Community**