ExcelにおけるC​OUNTIFSはどう​コードできますか

6 vues (au cours des 30 derniers jours)
KO
KO le 18 Avr 2021
Commenté : KO le 19 Avr 2021
「OK」or「NG」が表示されている列があり,
何番目から何番目までの列で,”OK”のセルが何個あるか,というのを数えるときに,
ExcelではCOUNTIFSで指定範囲,指定条件を複数指定して設定できますが,
MatLabではIF関数などを使って上手く作れるでしょうか.

Réponse acceptée

Hernia Baby
Hernia Baby le 18 Avr 2021
categoricalに変更してカウントはいかがでしょうか?
A = categorical({'NG' 'OK' 'OK' 'OK' 'NG'});
cnt = sum(A=='OK')
cnt = 3
NGもまとめて見たいよって場合はcountcatsをお勧めします
  1 commentaire
KO
KO le 19 Avr 2021
天才的です。ありがとうございます。

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Data Import from MATLAB dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!