How do I get hmmestimate to work correctly?

1 view (last 30 days)
Joe
Joe on 20 Mar 2013
Hello all,
I'm attempting to take a sequence of observations and associated states and perform [TRANS,EMIS] = hmmestimate(observations,states) so that I can use this to predict the next occurrence.
where observations are temperatures > 0, to 3 decimal places
and states are either -1,0, or 1, depending on whether or not the associated observation is below, equal to, or above a desired setpoint, or reference condition.
However, all I get is this!!
Warning: Size vector should be a row vector with integer elements. > In hmmestimate at 139 In HMM1 at 22 Attempted to access E(2,22.319); index must be a positive integer or logical.
Error in hmmestimate (line 146) E(states(count),seq(count)) = E(states(count),seq(count)) + 1;
Error in HMM1 (line 22) [TRANS,EMIS] = hmmestimate(T,cond);
22.319 is the first temperature in my array. Someone please explain to me what I'm doing wrong!!!

Answers (0)

Products

Community Treasure Hunt

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

Start Hunting!