필터 지우기
필터 지우기

perform matrix operations on cell matrices containing symbolic equations?

조회 수: 1 (최근 30일)
Samuel
Samuel 2011년 10월 30일
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
Andrei Bobrov
Andrei Bobrov 2011년 10월 30일
hi Samuel! I want get simple example your arrays
Samuel
Samuel 2011년 10월 30일
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!

댓글을 달려면 로그인하십시오.

답변 (2개)

Samuel
Samuel 2011년 10월 31일
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 2011년 11월 6일
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