calculate the maximum at each point of the grid

1 回表示 (過去 30 日間)
ELISABETTA BILLOTTA
ELISABETTA BILLOTTA 2023 年 3 月 12 日
回答済み: Voss 2023 年 3 月 13 日
i have such a script where PP_all is a 100651x1 array and it derives from this formula
PP_all=1-((1-P_1_4).*(1-P_1_6).*(1-P_1_9).*(1-P_2_2).*(1-P_6).*(1-P_7).*(1- P_8).*(1-P_9 ).*(1-P_10));
in each point of the grid, therefore, the product of these values is displayed.
Now instead, in each point of the grid, I have to visualize the maximum value among all these probabilities that created me PP_all. It is as if they were a series of overlapping grids and in the end, in each point of the grid, I only display the maximum value among all the probabilities that make up PP_all and I create a new grid.
So I have to get another 100651x1 matrix (useful for visualizing the final map) where each point of the grid represents the maximum value among all the probabilities P_1_4, P_1_6,P_2_2...P_10.
Can someone help me?
  1 件のコメント
ELISABETTA BILLOTTA
ELISABETTA BILLOTTA 2023 年 3 月 12 日
I noticed that if I use only two probabilities
C= max(P_0_1,P_0_3);
I get the result I want, that is an array from 100651x1.
the problem is that the values to insert in parenthesis are not 2 but many more. anyone can help me?

サインインしてコメントする。

採用された回答

Voss
Voss 2023 年 3 月 13 日
PP_temp = [P_1_4, P_1_6, P_1_9, P_2_2, P_6, P_7, P_8, P_9, P_10];
PP_max = max(PP_temp,[],2);

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMultidimensional Arrays についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by