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 draw 2d Histogram in 3d

Subject: How to draw 2d Histogram in 3d

From: kumar vishwajeet

Date: 15 Jul, 2010 07:54:06

Message: 1 of 1

The following code draws histogram for Probability density function(pdf):-

mean1 = -0.5;
mean2 = 0.5;
var1 = 0.1;
var2 = 1;
z=linspace(-10,10,10000);
pdf1=mean1+sqrt(var1).*randn(1,10000);
pdf2=mean2+sqrt(var2).*randn(1,10000);
pdf(1,:)=0.1.*pdf1+0.9.*pdf2;
hist(pdf(1,:),z);

Now I want to repeat these steps for different time steps because after every 1 second mean and variance(var) changes for the given data. I want to draw histogram for 20 seconds all in the same figure. Thus 2d histogram has to be drawn in 3d space. How can I do it??

Thanks.

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