Subscript indices must either be real positive integers or logicals and other error.
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
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.
0 comentarios
Respuestas (2)
Jan
el 8 de Feb. de 2013
It seems like you want to call the function hmmdecode(), but you have created a variable with the same name. Check this by:
dbstop if error
Then start the code and wait until Matlab stops. Then type in the command line:
which hmmdecode -all
2 comentarios
Walter Roberson
el 8 de Feb. de 2013
I see that you have copied the example right from the documentation. We need to ask, though, which MATLAB version you are using, as you might be using an earlier version that does not support that example as-is.
Have you tried passing in a Symbols name/value pair?
0 comentarios
Ver también
Categorías
Más información sobre Entering Commands en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!