Read data from textfile to use hmmtrain
1 次查看(过去 30 天)
显示 更早的评论
Hi.
I wish to use hmmtrain in order to get transition and observation probabiliites (Baum Welch algorithm). Since I have all my data listed in a text file I wish to read that data and save it in a matrix to put it in the first parameter (seq) of hmmtrain(seq,tr,e);
Anyone can help please?
This is an example of what I want:
Data from text file: 1,3,2,3,2,3,1,3; 1,1,1,1,1,3;
Put data into seq variable: seq {[1,3,2,3,2,3,1,3],[1,1,1,1,1,3]};
0 个评论
回答(1 个)
Sean de Wolski
2013-2-8
doc importdata %?
4 个评论
Sean de Wolski
2013-2-11
When you import it, it has commas? This means the import isn't working properly. What happens if you import it using the import tool?
Can you paste the exact text of your text file into a comment or the original question?
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Text Data Preparation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!