フィルターのクリア

Set lower than 0.1 values to zero in tables that stored in a cell

5 ビュー (過去 30 日間)
BN
BN 2020 年 5 月 28 日
コメント済み: BN 2020 年 5 月 28 日
Dear all,
In a 1x3 cell containing three (28x6) tables; inside tables how I can set each value that lower than 0.1 to zero in a1 and a2 columns (names of columns are a1 and a2) of all tables?
Thank you all

採用された回答

Fangjun Jiang
Fangjun Jiang 2020 年 5 月 28 日
In general, this is how you do it. Apply it to a table inside a cell should not be that difficult.
a=rand(3,5);
index=a<0.5;
a(index)=0
  3 件のコメント
Fangjun Jiang
Fangjun Jiang 2020 年 5 月 28 日
編集済み: Fangjun Jiang 2020 年 5 月 28 日
If the data inside the cell is array (not table object), then you can do this
cellfun(@(x) x(x<0.1)=0, C, 'UniformOutput', false);
BN
BN 2020 年 5 月 28 日
Thank you

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

その他の回答 (0 件)

カテゴリ

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

タグ

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by