필터 지우기
필터 지우기

Find how many times a word appeared in matrix

조회 수: 2 (최근 30일)
Belal Abboushi
Belal Abboushi 2015년 2월 16일
편집: Stephen23 2015년 2월 16일
Hello, I'm trying to find out how many times a certain word appeared in a matrix. What command should i use?

답변 (1개)

Stephen23
Stephen23 2015년 2월 16일
편집: Stephen23 2015년 2월 16일
A = {'anna','bob','cedric','diana','anna'};
B = 'anna';
N = sum(strcmp(A,B));

카테고리

Help CenterFile Exchange에서 Data Types에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by