Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Subscript indices must either be real positive integers or logicals and other error.

Subject: Subscript indices must either be real positive integers or logicals and other error.

From: Emmanuel

Date: 8 Feb, 2013 17:15:08

Message: 1 of 2

Hi,

I want to read through both matrixes seq and seq2 but gives me two errors. Here is the code:

tr = [0.95,0.05;
             0.10,0.90];
    e = [1/6, 1/6, 1/6, 1/6, 1/6, 1/6;
              1/10, 1/10, 1/10, 1/10, 1/10, 1/2;];
         seq1 = hmmgenerate(100,tr,e);
         seq2 = hmmgenerate(200,tr,e);
         seqs = {seq1,seq2};
         [estTR, estE] = hmmtrain(seqs,tr,e);
pStates = hmmdecode(seqs,tr,e);
Error using hmmdecode (line 96)
The sequence must be numeric, or you must specify the symbols used in the sequence.
   pStates = hmmdecode(seqs(i,:),tr,e);
  Subscript indices must either be real positive integers or logicals.

Subject: Subscript indices must either be real positive integers or logicals and other error.

From: Sadik

Date: 9 Feb, 2013 02:33:09

Message: 2 of 2

seqs is a cell array. This is why.
Best.

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us