フィルターのクリア

toggle percentual from matrix

1 回表示 (過去 30 日間)
Luca Re
Luca Re 2023 年 9 月 30 日
コメント済み: Star Strider 2023 年 9 月 30 日
how toggle % from matrix?
per=5;
a=magic(4)
i want to toggle from each element per (5%)

採用された回答

Star Strider
Star Strider 2023 年 9 月 30 日
Perhaps this —
per=5;
a=magic(4)
a = 4×4
16 2 3 13 5 11 10 8 9 7 6 12 4 14 15 1
apr = a*(1-0.05) % 95% Of The Value
apr = 4×4
15.2000 1.9000 2.8500 12.3500 4.7500 10.4500 9.5000 7.6000 8.5500 6.6500 5.7000 11.4000 3.8000 13.3000 14.2500 0.9500
apr = a*0.05 % 5% Of The Value
apr = 4×4
0.8000 0.1000 0.1500 0.6500 0.2500 0.5500 0.5000 0.4000 0.4500 0.3500 0.3000 0.6000 0.2000 0.7000 0.7500 0.0500
.
  4 件のコメント
Luca Re
Luca Re 2023 年 9 月 30 日
okk thank
Star Strider
Star Strider 2023 年 9 月 30 日
As always, my pleasure!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by