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:
Histogram Bin

Subject: Histogram Bin

From: curoch

Date: 4 Aug, 2011 12:30:29

Message: 1 of 2

Hi all,

Background to my problem:
- I have a matrix A of size (n,6)
- I have created a histogram based on the elements in A(:,1)
- In column 5, I have a 1 if the elements of row 2 and 3 are both non zero, 0 if the element of row 3 is zero
- In column 6, I have a 1 if the elements of row 2 and 4 are both non zero, 0 if the element of row 4 is zero

 Problem:
- Using the "bin" created for the histogram of A(:,1), I need to calculate the total number of non zero values in row 5 and 6 for each bin so that I can analyse them with the frequency for each interval.

Can anybody point me in the right direction please.

Thank you very much for your help,

FB

Subject: Histogram Bin

From: curoch

Date: 4 Aug, 2011 13:17:26

Message: 2 of 2

Just spotted an error in my original post

Problem:
Using the "bin" created for the histogram of A(:,1), I need to calculate the frequency of non zero values in column 5 and 6 for each bin interval so that I can analyse them with the frequencies calculated for the histogram of A(:,1)

"curoch" wrote in message <j1e3d5$pd5$1@newscl01ah.mathworks.com>...
> Hi all,
>
> Background to my problem:
> - I have a matrix A of size (n,6)
> - I have created a histogram based on the elements in A(:,1)
> - In column 5, I have a 1 if the elements of row 2 and 3 are both non zero, 0 if the element of row 3 is zero
> - In column 6, I have a 1 if the elements of row 2 and 4 are both non zero, 0 if the element of row 4 is zero
>
> Problem:
> - Using the "bin" created for the histogram of A(:,1), I need to calculate the total number of non zero values in row 5 and 6 for each bin so that I can analyse them with the frequency for each interval.
>
> Can anybody point me in the right direction please.
>
> Thank you very much for your help,
>
> FB

Tags for this Thread

No tags are associated with 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