Creating a frequency matrix in excel

Status
Not open for further replies.

abberyfarm

Well-known Member
Joined
Aug 14, 2011
Messages
733
Hi there,

I looking to create a frequency matrix using VBA but I'm not sure if it is possible?

I'd appreciate any advice and code to get me on the way.

I have time, speed and acceleration data for a car in three columns. I'm trying to generate a 2 dimensional frequency matrix of velocity and acceleration.

The frequency matrix would keep track of how often a state occurs in the dataset. At the end of the process every possible state reflected in the dataset would be contained in the matrix indicating how often it occurred.

Here is an example (pictures) of some sample data and how the matrix would look for this small sample. This is secure site.

http://imageshack.us/photo/my-images/683/excel1.png/
http://imageshack.us/photo/my-images/683/excel1.png


You see in the data for example state (1, -1.1) occurred twice and state (2,-0.8) occurred once etc.

I suppose you would start off by
1. Finding the last row of data.
2. Find the max speed value and create matrix heading 0 - Max value at 1 km/hr intervals.
3. Find the min and max values of acceleration and create matrix heading from Min - Max at 0.1 m/s intervals.
4. Start the top of the list and go down through each set of points (speed, acceleration) in the data then go to the matrix and insert 1.
5. Then continue onto the next point and if a previous point occurred then increase the value in the matrix by 1.

If I need to explain in more detail, please let me know

Appreciate any input

Thanks

John
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Status
Not open for further replies.

Forum statistics

Threads
1,224,503
Messages
6,179,134
Members
452,890
Latest member
Nikhil Ramesh

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top