Borrar filtros
Borrar filtros

Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

Find minimum for cell arrays

1 visualización (últimos 30 días)
Joseph Lee
Joseph Lee el 21 de Nov. de 2017
Cerrada: Joseph Lee el 23 de Nov. de 2017
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 comentarios
Image Analyst
Image Analyst el 22 de Nov. de 2017
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 el 23 de Nov. de 2017
Editada: Joseph Lee el 23 de Nov. de 2017
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.

Respuestas (0)

La pregunta está cerrada.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by