Breaking x-axis into bins and extracting max value corresponding y-axis
1 回表示 (過去 30 日間)
古いコメントを表示
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
0 件のコメント
回答 (1 件)
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);
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!