Subscript indices must either be real positive integers or logicals and other error.
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Antworten (2)
Jan
am 8 Feb. 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 Kommentare
Walter Roberson
am 8 Feb. 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 Kommentare
Siehe auch
Kategorien
Mehr zu Entering Commands finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!