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

David Hill
David Hill 2022년 3월 8일
편집: David Hill 2022년 3월 8일
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 2022년 3월 8일
Please provide some sample data and the wanted output.
Catalin Dinu
Catalin Dinu 2022년 3월 9일
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 2022년 3월 9일
You did not mention, what you want as output.

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

 채택된 답변

David Hill
David Hill 2022년 3월 9일

2 개 추천

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Resizing and Reshaping Matrices에 대해 자세히 알아보기

질문:

2022년 3월 8일

댓글:

2022년 3월 10일

Community Treasure Hunt

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

Start Hunting!

Translated by