필터 지우기
필터 지우기

how to count number of states in sequence?

조회 수: 1 (최근 30일)
Ram k
Ram k 2016년 5월 5일
편집: Azzi Abdelmalek 2016년 5월 5일
Suppose I have a sequence 1,3,3,1,2,1,4,2,3,1,4,2,4,4,4,3,1,2,5,1 in this 5 states are there, so how to count that there are 5 states.

답변 (1개)

Azzi Abdelmalek
Azzi Abdelmalek 2016년 5월 5일
편집: Azzi Abdelmalek 2016년 5월 5일
a=[1,3,3,1,2,1,4,2,3,1,4,2,4,4,4,3,1,2,5,1]
out=unique(a)
number_of_states=numel(out)

카테고리

Help CenterFile Exchange에서 Markov Chain Models에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by