フィルターのクリア

How do I find the max value over specific intervals of a column vector?

2 ビュー (過去 30 日間)
Scott Phillips
Scott Phillips 2017 年 11 月 3 日
コメント済み: Leon Gosh 2023 年 11 月 19 日
I have a column vector of 500 values of data that I need to find max values of and I would like to use a for loop to do it. I want to find the maximum value over every 10 data values, e.g. taking all of those 10 points and finding the maximum, and repeating this process for the next 10 values (1-10),(11-20), and so on. I've tried looping with specific steps but it doesn't work and I get some variation of the maximum of the entire list or just the specific points where the loop starts (1, 11, etc.). Could anyone point me in the right direction?

回答 (1 件)

Roger Stafford
Roger Stafford 2017 年 11 月 3 日
mx = max(reshape(M,10,[]),[],1);

カテゴリ

Help Center および File ExchangeLoops and Conditional Statements についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by