Got Questions? Get Answers.
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
How to generate Joint frequency distributions from a mxn Matrix

Subject: How to generate Joint frequency distributions from a mxn Matrix

From: S Ehtesham Al Hanif

Date: 8 Dec, 2012 21:39:08

Message: 1 of 2

I have three column but i can avoid first one which has time value. In details:
Column T has value of time as second t=1:1:1400;
Column A has value of velocity/speed and it has 1400 speed values from 0(zero) to 100(hundred). In this case some velocity values repeats after uncertain interval.
Column B has value of acceleration and it has 1400 acceleration/deccelaration values from --4(minus four) to +4(four). In this case some acceleration values has repetition.

Now i want to generate a mxn matrix where every position will be a frequency which can full fill one condition from A and same time one corresponding B condition.

I subdivided velocity column into several group, such as: 0 to 5, 5 to 10, 10 to 15, 15 to 20 .........90 to 95 and 95-100.

Similarly i subdivided acceleration column into several group such as: -4 to -3, -3 to -2 ...... 2 to 3 and 3 to 4.

Then, i will count frequency such a way that it will full fill both columns same row with those condition.

As an example: if i look at the previous posts Column A. And Column B, then i have to find out how many times/frequency the below conditioned fullfilled?

If velocity range : 30 to 35 m/s and acceleration at the same time/row in -0.5 to -0.25 range ? According to example it has frequent/count 3! If velocity range same but acceleration condition changed to -0.25 to 0 then it has frequency 1.

I think this time my illustration is better as if it is possible to show you by showing picture or figure by attaching here it will be easy to explain what i am planning for!

Here I am showing an example in below links:
[URL=http://imageshack.us/photo/my-images/706/captureyt.png/][IMG]http://imageshack.us/a/img706/3983/captureyt.png[/IMG][/URL]

Ehtesham

Subject: How to generate Joint frequency distributions from a mxn Matrix

From: Bruno Luong

Date: 9 Dec, 2012 09:39:09

Message: 2 of 2

This question has been answered
http://www.mathworks.com/matlabcentral/newsreader/view_thread/324901

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us