Afficher commentaires plus anciens
スプレットシートで数値の配列があります.
これを下記のようにグループ分けルールに沿って変換し,
スプレットシートやテキストで保存したいです.
■グループ分けルール
入力 → 変換後の出力
1 → 1
2~5 のいずれかの場合 → 2
6,8,10 のいずれかの場合 → 3
7,9,11 のいずれかの場合 → 4
■変換
入力 → 変換後の出力
1 → 1
2 → 2
5 → 2
9 → 4
Réponse acceptée
Plus de réponses (1)
%Random data for example
in = randi(11, 1, 10)
out = discretize(in, 0:11, [1 2 2 2 2 3 4 3 4 3 4], 'IncludedEdge', 'right')
2 commentaires
H.O
le 26 Fév 2024
Atsushi Ueno
le 26 Fév 2024
I like it! This is exactly the MATLAB skills!
Catégories
En savoir plus sur スプレッドシート dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!