Cell array and matrix operation

11 views (last 30 days)
Hello, I have a 4*4 cell array that has a 10*10 matrix within each cell like below (let's call it C):
And two 10*10 separate matrices let's say:
Using these 3 arguments, I want do an operation like below:
Basically, I want to consider each component of the cell (for example C{1} for the first attempt) and do this operation with the B and C for every 16 components of the cell in a repetitive manner. How can I perform this operation? I would appreciate it if someone could please help me. Thank you.

Accepted Answer

Sulaymon Eshkabilov
Sulaymon Eshkabilov on 9 Jul 2021
for ii=1:4
for jj=1:4
ANS{ii,jj} = (A*C{ii,jj}-B*C{ii,jj})/((C{ii,jj}.^2).*C{ii,jj}.*(1+(B./C{ii,jj}).^2)).^(1.5);
Sulaymon Eshkabilov
Sulaymon Eshkabilov on 9 Jul 2021
You are most welcome! All the best!

Sign in to comment.

More Answers (0)


Find more on Resizing and Reshaping Matrices in Help Center and File Exchange


Community Treasure Hunt

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

Start Hunting!

Translated by