필터 지우기
필터 지우기

array operation in matlab

조회 수: 1 (최근 30일)
ali hassan
ali hassan 2022년 2월 14일
편집: Matt J 2022년 2월 14일
if i have type cell:
a=['hi' 'lo' 'hi'];
b=['lo' 'hi' 'hi'];
how can i find total number of times when there is 'hi' in a and 'hi' in b as well?

채택된 답변

Matt J
Matt J 2022년 2월 14일
편집: Matt J 2022년 2월 14일
a={'hi' 'lo' 'hi'};
b={'lo' 'hi' 'hi'};
nnz(string(a)=="hi" & string(b)=="hi")
ans = 1

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Dialog Boxes에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by