フィルターのクリア

create sliding window per rows in a matrix ?

1 回表示 (過去 30 日間)
Andrea Finocchiaro
Andrea Finocchiaro 2015 年 10 月 15 日
回答済み: Nick Hobbs 2015 年 10 月 26 日
Do you know ho to create a sliding window in a matrix per row? For example,ignoring the function I am using, I would like to calculate it for a slinding window of the matrix.LIke the matrix is 378x9, and i want a window(per row)of 180. Thanks

回答 (1 件)

Nick Hobbs
Nick Hobbs 2015 年 10 月 26 日
I understand you want to create a sliding window for a particular row in a matrix. One way to do this is to use indexing within MATLAB and create a new matrix from the data. For example, for a particular row of data
calculations = []
calculations(end + 1) = function(matrix(rowNumber,columnNumber:columnNumber+180))
You can create a for loop around this code for columnNumber, and as long as columnNumber+180 <= size(matrix,2), then you should be able to create your new values.

カテゴリ

Help Center および File ExchangeData Type Identification についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by