フィルターのクリア

Breaking x-axis into bins and extracting max value corresponding y-axis

1 回表示 (過去 30 日間)
Michael
Michael 2015 年 2 月 18 日
回答済み: Image Analyst 2015 年 2 月 18 日
Hello,
I am working with force curves, and I am analyzing these curves as force over a percentage of time (i.e., 0-100%). I have two questions:
1) How do I break my x-axis into 10 equal bins 0-10%, 10%-20%, 20-30%, etc.
2) How do I find a single value on the Y-axis (i.e., max) for each bin (see photo)?
Thanks,
Michael

回答 (1 件)

Image Analyst
Image Analyst 2015 年 2 月 18 日
To find the max in each 10%, assuming that your signal vector Y is a multiple of 10 long
numberOfElements = length(Y);
reshapedY = reshape(Y, [10, numberOfElements /10]);
maxInEachTenth = max(reshapedY, [], 1);

カテゴリ

Help Center および File ExchangeCorrelation and Convolution についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by