フィルターのクリア

Sum function with letters

4 ビュー (過去 30 日間)
Matrix-Matlab
Matrix-Matlab 2017 年 4 月 23 日
回答済み: Stephen23 2017 年 4 月 23 日
Hello,
I have a dataset of 1000x3 in which I have names and numbers. It has been imported from excel using xlsread.
The issue I have is with counting the number of observations I have with a word. I.E AIR 6 - how many times does that occur?
Im trying to use sum function and if statement, but I am not able to get anything useful.
Please, someone help me.

回答 (1 件)

Stephen23
Stephen23 2017 年 4 月 23 日
Where C is a cell array of strings:
nnz(strcmp(C,'AIR 6'))

カテゴリ

Help Center および File ExchangeData Import from MATLAB についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by