perform matrix operations on cell matrices containing symbolic equations?

1 vue (au cours des 30 derniers jours)
Samuel
Samuel le 30 Oct 2011
Hello all,
Just like the question says- is the evaluation of something like below possible? {8X3 cell array}{3x3 numeric array}{3X8 cell array}
The 3x3 I can make to a cell array if need be, but that was my end goal, and was wondering if such operation was possible on matlab. the cell array will contain symbolic functions (so it won't contain just numbers and therefore cell2mat function won't work here-correct me if I am wrong).
My ultimate goal is to perform integration on the resultant matrix. I was thinking of running a for loop to extract each element out of the matrix, perform integration, and put back into the same location in a different resultant matrix.(Is there an easier operation for this as well?) However, this will require that matrix multiplication be evaluated.
Any help will be appreciated. Thanks very much!
Sam
  2 commentaires
Andrei Bobrov
Andrei Bobrov le 30 Oct 2011
hi Samuel! I want get simple example your arrays
Samuel
Samuel le 30 Oct 2011
Hey andrei. Thanks for ur reply.
Here is a(very simple set) sample cell array set i wish to operate-
[5x+4 6x+2][2x+5y ; 3x+4]
where x is a symbol, and the functions are all symbolic ones. Thanks!

Connectez-vous pour commenter.

Réponses (2)

Samuel
Samuel le 31 Oct 2011
and lets add one more issue here- right now, it seems if the matrices that I am trying to multiply is same in dimensions, I can just use the cellfun function as andrei put above to solve the problem.
However, right now, the matrices I am trying to multiply is not same in dimensions. [8 x 3][3 x 3][3 x 8]
TIA

Samuel
Samuel le 6 Nov 2011
Okay, here is an answer for the fundamental reason I posed this question- to evaluate symbolic arrays. So as it turns out, it seems symbolic functions CAN be put into arrays, and they can also be integrated- after it has been done, if values are desired from them, just use the "subs" function to get the numeric solutions.
thanks for all who contributed to the thread, however.

Community Treasure Hunt

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

Start Hunting!

Translated by