How to Double integrate cell of array containing cell of array?
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello,
I have been trying to double integrate a cell of array containing cell of array/objects. However i am not able to get the required result and convert the result inot a matrix of same order (nxn). The screenshot of the same has been attached for reference.
Info regarding the Variables used in code as you in the screenshot attached:-
W{i,j} = 25 x 25 cell, where each cell contains the functions of variable "theta and phi".
Objective is to double integrate the W cell with respect to theta and phi within the limits of zero to pi/2 & zero to 2*pi respectively.
then, followed by converting the result into a matrix of 25x25 order, post compltion of the integration.
Request if someone may please show some guidance for the afpre mentioned problem.
Thanks in advance
Regards
Richard
0 Kommentare
Antworten (1)
Torsten
am 3 Mai 2023
Bearbeitet: Torsten
am 3 Mai 2023
Works. If your problem is more complicated, you will have to include the code as plain text (no graphics) in order to see where you get problems.
W = cell(2,2);
W{1,1} = @(theta,phi) sin(theta);
W{1,2} = W{1,1};
W{2,1} = W{1,1};
W{2,2} = W{1,1};
Wnum(1,1) = integral2(W{1,1},0,pi/2,0,2*pi)
0 Kommentare
Siehe auch
Kategorien
Mehr zu Logical finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!