How can i get a bell curve onto a histogram

6 views (last 30 days)
anthony
anthony on 24 Feb 2012
global datas;
hist(handles.axes5,datas.data);
hold on;;
plot(handles.axes5,q)
xlabel(handles.axes5,'VLF Wave Strenth(Watts)','FontSize',12);
ylabel(handles.axes5,'Frequency','FontSize',12);
title(handles.axes5,'Super Sid Histogram','FontSize',12);
  2 Comments
Image Analyst
Image Analyst on 24 Feb 2012
What is q? Where did you get it?
Walter Roberson
Walter Roberson on 24 Feb 2012
By the way, "data" is already plural. The singular of "data" is "datum".

Sign in to comment.

Answers (2)

the cyclist
the cyclist on 24 Feb 2012
It would be good if you could give more detail about what you want. For example, do you want to fit the "bell curve" to the data, or do you have the parameters already? I am just taking a guess here, but you might want to look at the command histfit() and normfit(). If you don't necessarily mean a normal distribution when you say "bell curve", you might also investigate the function ksdensity(), which is a non-parametric approach to fitting a smooth curve to discrete data.

Walter Roberson
Walter Roberson on 24 Feb 2012
Change the
hold on;;
to
hold(handles.axes5, 'on');

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!