Arrange column vetors into table
4 ビュー (過去 30 日間)
古いコメントを表示
Hi!
I used the findpeaks function in matlab to find local maxima ('peaks') in a vector and their indices ('locs').
I would like to arrange the two outputs in a table. I used the table function to merge them, but this is what I get, instead of numbers.
I tried converting the variables to num but i didnt help.
Any thoughts?
Thx in advance!
0 件のコメント
採用された回答
Star Strider
2023 年 4 月 19 日
You simply need to transpose the row vectors to column vectors.
That is best done before creating the table, for example —
peaks = rand(1,11)
locs = sort(randi(25,1,11))
peaks = peaks(:)
locs = locs(:)
A = table(peaks,locs)
.
2 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Tables についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!