I don't need the occurance of the dataset. Histcount will give the no of occurence of the two variable. But there is also a third variable i.e. time. I need the time at the specific RPM and torque step.
How to bin the data set for two variables which will have some specific range at some specific interval?
1 view (last 30 days)
Show older comments
I have excel datasheet like screenshot attached above. Firstly I want to segregrate the according top gear position. After that a RPM and torque binning have to be done like the screenshot attached below.
I want to get the above mentioned matrix from the raw data
Answers (1)
Bruno Luong
on 26 Nov 2018
Check out
histcounts2
histogram2
3 Comments
Bruno Luong
on 26 Nov 2018
Edited: Bruno Luong
on 26 Nov 2018
"Histcount will give the no of occurence of the two variable"
Not only, look at the fourth and fifth output arguments:
[N,Xedges,Yedges,binX,binY] = histcounts2(___)
It gives you which of the RPM/Torque case a data fall into. You just need to sum up the corresponding time (for example using accumarray).
When you provide a screen capture, you'll get a at best a description of what to do.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!