Use entries of symbolic array outside of the array

1 次查看(过去 30 天)
I have defined a matrix of symbolic variables via
X=sym(x,[8,24]);
When I now type x5_24 for instance, MATLAB still says "Unrecognized function or variable x5_24". Why? I need to use the variable entries outside of the matrix X.

采纳的回答

Star Strider
Star Strider 2020-3-28
The reason is that the elements of ‘X’ are stored as matrix elements. The individual elements exist only as matrix elements, not as individual, named variables:
syms x
X=sym('x',[8,24]);
Q = X(5,24)
produces:
Q =
x5_24
  3 个评论
Tobias Ohrmann
Tobias Ohrmann 2020-3-28
Its a bit complicated, I transported the matrix X to Mathematica, did something with it there and got a new matrix with variables xi_j, which I now want to transport back to MATLAB. So appareantly this was a bad idea..

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Number Theory 的更多信息

产品


版本

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by