Decompose Data int a Matrix
显示 更早的评论
I got how to locate my data from the signal in the following link: http://www.mathworks.com/matlabcentral/answers/229678#answer_185935
but how to decompose my data int a matrix. I attached my row data.
2 个评论
Azzi Abdelmalek
2015-7-29
Decompose Data int a Matrix? What does that mean?
Mansour Aljohani
2015-7-30
采纳的回答
更多回答(1 个)
Mansour Aljohani
2015-8-9
2 个评论
Mansour Aljohani
2015-8-9
Star Strider
2015-8-10
My pleasure.
That usually means the array sizes between the LHS and RHS of an assignment don’t match. My code assumes all the ‘epochs’ (as I called them) were of equal lengths, since they were the same in the file you provided.
Change the loop to:
for k1 = 1:length(epk_start)
sig_mtx{k1} = signal(epk_start(k1):epk_end(k1));
tim_mtx{k1} = time_vct(epk_start(k1):epk_end(k1));
end
This converts ‘sig_mtx’ and tim_mtx to cell arrays. That should at least solve the current problem. However you will have to program subsequent assignments involving them to accommodate the different lengths, and to change the cell arrays to double arrays in your code. See the documentation on Cell Arrays for details.
类别
在 帮助中心 和 File Exchange 中查找有关 Continuous Waveforms 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
