how to convert a signal (1x200) into a square matix???
2 次查看(过去 30 天)
显示 更早的评论
i have a signal with data length (1x200). how to convert that into square matrix? will the shape of the signal change after converting into matrix? without changing the signal shape is it possible to convert it to matrix.
1 个评论
Satishkumar Aruljothi
2016-8-8
Your Question is not clear.Could you please clarify the following things 1.what is the nature of your signal ., discrete ?.(Could you please share signal log if you have) 2.What is your final output form ? if it is Square ,can you give some example ?
回答(2 个)
KSSV
2016-8-8
You can convert an array of m*n elements into a matrix using reshape... read about reshape......
Eg:
data = rand(100,1) ;
matrix = reshape(k,[10,10])
Note that to reshape an array into matrix, the number of elements must be equal.
0 个评论
Walter Roberson
2016-8-8
200 is not a square, so you cannot arrange the values in a square matrix. The smallest square that is at least 200 would be 225, which is 15*15
If you have the Signal processing toolbox, look at using buffer()
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Type Conversion 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!