Mostrar comentarios más antiguos
スプレットシートで数値の配列があります.
これを下記のようにグループ分けルールに沿って変換し,
スプレットシートやテキストで保存したいです.
■グループ分けルール
入力 → 変換後の出力
1 → 1
2~5 のいずれかの場合 → 2
6,8,10 のいずれかの場合 → 3
7,9,11 のいずれかの場合 → 4
■変換
入力 → 変換後の出力
1 → 1
2 → 2
5 → 2
9 → 4
Respuesta aceptada
Más respuestas (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 comentarios
H.O
el 26 de Feb. de 2024
Atsushi Ueno
el 26 de Feb. de 2024
I like it! This is exactly the MATLAB skills!
Categorías
Más información sobre スプレッドシート en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!