Symbolic integration of cell arrays

조회 수: 5 (최근 30일)
EldaEbrithil
EldaEbrithil 2020년 10월 15일
댓글: EldaEbrithil 2020년 10월 15일
Hi all
is it possible to perform symbolic integration of cell arrays? P is a cell array where each element is the function that need to be integrated
I guess it's something like that but i am not sure:
syms x
for i=1:length(P)
Q{i}=int(P{i},x);
end
Thank you for the help
Regards

채택된 답변

Walter Roberson
Walter Roberson 2020년 10월 15일
It is not possible to directly perform symbolic integration of cell arrays.
You can use the code you posted, or you can use
Q = cellfun(@(p) int(p,x), P, 'uniform', 0);
  댓글 수: 1
EldaEbrithil
EldaEbrithil 2020년 10월 15일
Thank you very much Walter!! It works

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by