필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Find minimum for cell arrays

조회 수: 1 (최근 30일)
Joseph Lee
Joseph Lee 2017년 11월 21일
마감: Joseph Lee 2017년 11월 23일
P & z are both 10x1300 cell arrays, how do i find the minimum P value at z=1 after i obtained the index, eg.
Columns 1297 through 1300
[1×23 double] [1×29 double] [1×23 double] [1×25 double]
[1×25 double] [1×25 double] [1×25 double] [1×27 double]
[1×25 double] [1×27 double] [1×27 double] [1×25 double]
[1×29 double] [1×29 double] [1×25 double] [1×23 double]
[1×25 double] [1×23 double] [1×27 double] [1×27 double]
[1×27 double] [1×23 double] [1×21 double] [1×23 double]
[1×29 double] [1×27 double] [1×27 double] [1×27 double]
[1×21 double] [1×21 double] [1×29 double] [1×27 double]
[1×25 double] [1×25 double] [1×21 double] [1×27 double]
[1×25 double] [1×25 double] [1×25 double] [1×23 double]
index=cellfun( @(Z) find(abs(Z-1)<0.005), z, 'uniform', 0);
index results Columns 1297 through 1300
[1×0 double] [1×0 double] [1×0 double] [1×0 double]
[1×0 double] [1×0 double] [1×0 double] [1×0 double]
[ 25] [1×2 double] [1×2 double] [1×2 double]
[1×2 double] [1×2 double] [1×2 double] [1×2 double]
[1×2 double] [1×2 double] [1×2 double] [1×2 double]
[1×0 double] [1×0 double] [1×2 double] [1×2 double]
[1×0 double] [1×0 double] [1×0 double] [1×0 double]
[1×0 double] [1×0 double] [1×0 double] [1×0 double]
[1×0 double] [1×0 double] [1×0 double] [1×0 double]
[1×0 double] [1×0 double] [1×0 double] [1×0 double]
min_P=min(P(index)) < how do i change this such that the minimum of all P values from index can be found.
  댓글 수: 2
Image Analyst
Image Analyst 2017년 11월 22일
You forgot to attach P and z in a .mat file, so how can people try any code to help you?
Joseph Lee
Joseph Lee 2017년 11월 23일
편집: Joseph Lee 2017년 11월 23일
You can consider them as just random numbers, its a long code of calculations to get P and z. They're the same size, you can even consider P as z, it is simply just the reverse of
cellfun( @(Z) find(abs(Z-1)<0.005), z, 'uniform', 0);
You have already seen the previous step to this. I just need to find the minimum among different sized cells, I dont think the exact data is required.

답변 (0개)

이 질문은 마감되었습니다.

태그

Community Treasure Hunt

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

Start Hunting!

Translated by