Operations on cell arrays over lagged rows

If I have a cell arrays of different dimension, say for i=1 to 10, a cell P{i} of (1:n-1,3) and another Y{i}(1:n,3). I want to make a computation within loop over all element of P and Y for each i like sum (P{i}(j,:).*Y{i}(j-1,:)) such that for each i a row of P is multiplied by the previous row of Y what is the code??

1 comentario

Niveen El Zayat
Niveen El Zayat el 4 de Mayo de 2018
I tried this code
indx=2:n; P{i}.*Y{i}(ind,:);
Is that right??

Respuestas (0)

La pregunta está cerrada.

Etiquetas

Preguntada:

el 4 de Mayo de 2018

Cerrada:

el 20 de Ag. de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by