문제

I have a cell :

data  = 1 x 95

which every cell contains

160 x 160 double

I want to find the minimum value of every data(row,column) in 160 x 160 matrix between 95 cells so the answer is :

data = 1 x 1
min(160 x 160) double

Also, I want to save the index, which matrix that gives the min value for that data(row,column), the answer is like this :

index = 160x160 

Is there any help? Thankyou.

도움이 되었습니까?

해결책

Concatenate the cell elements to form an ND array.

concatenated_data = cat(3, data{:});
[min_values, min_index] = min(concatenated_data, [], 3);
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top