Finding the elements within a certain range [XMin, XMax] in every column of an array, then converting all the elements of each column within that range to the minimum of that range

1 回表示 (過去 30 日間)
Saeid
Saeid 2021 年 3 月 13 日
編集済み: Cris LaPierre 2021 年 3 月 13 日
I want to find all the elements within a certain range in every column of an array. For example, I want to find all the elements, x, of column 1 of the array below that satisfy: 1>x>=0,01 (minimum of column). Then find the elements x of column 2 that satisfy 5>x>=0,05, and in column 3, all the elements for which 2>x>=0,07. Then I want to convert all those elements to the minimum values of that range for each columns, which are: 0,01, 0,05 and 0,007.
It must look like this:

回答 (1 件)

Cris LaPierre
Cris LaPierre 2021 年 3 月 13 日
編集済み: Cris LaPierre 2021 年 3 月 13 日
Look into indexing into and modifying arrays, logical indexing, and for loops.
You can learn about all these topics in MATLAB Onramp (Chs 5, 12, and 13)

カテゴリ

Help Center および File ExchangeCharacters and Strings についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by