Hello,
I have two cell array made of different lengths vectors. Also the arrays have different layouts: 3x3 cells vs. 3x1 cells.
How can I divide them and retain the min vector length to the elements of the newly created array?
I have already tried C=A.\B and seems to be a problem with the cell type of the arrays.
Many thanks.

4 comentarios

David Hill
David Hill el 8 de Mzo. de 2022
Editada: David Hill el 8 de Mzo. de 2022
Do not understand you. It is not hard to find the array having minimum length within the cell arrays. But I have no idea what this sentence means: How can I divide them and retain the min vector length to the elements of the newly created array.
Jan
Jan el 8 de Mzo. de 2022
Please provide some sample data and the wanted output.
Catalin Dinu
Catalin Dinu el 9 de Mzo. de 2022
Hello,
I'm using two different lengths of vectors 4k and 6k for making up the two arrays. I am looking to have a new array made up of the vectors resulted from the division operation with the first 4k elements. I hope it makes more sense now.
Jan
Jan el 9 de Mzo. de 2022
You did not mention, what you want as output.

Iniciar sesión para comentar.

 Respuesta aceptada

David Hill
David Hill el 9 de Mzo. de 2022

2 votos

Lots of assumptions below, but you should be able to adopt the below code for what you want to do.
[r,c]=size(A);
for R=1:r
for C=1:c
B{R,C}=A{R,C}(1:4000)./F{R}(1:4000);%I assume you want to divide across the entire row
end
end

Más respuestas (0)

Categorías

Preguntada:

el 8 de Mzo. de 2022

Comentada:

el 10 de Mzo. de 2022

Community Treasure Hunt

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

Start Hunting!

Translated by