Need Help Forming a Matrix from an Array
显示 更早的评论
so i have an array that is (4051x1), called xvoltage, and I need to form a matrix with this vector only, I want to do something like a sliding window, that the first row are samples 2650:2655, and then the second row world be from 2651:2656 , and so on successively, can someone help me out i'm stuck , it just keeps repeating the same values forming a five by five matrix.
for p=1:5
for q=1:5
xV(p,q)=xvoltage(2650+q);
end
end
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!