Plotting a best fit curve over a histogram

Click For Summary
The discussion revolves around plotting a line of best fit over a histogram in MATLAB, specifically using data loaded in ASCII format. The user has successfully loaded the data and created a histogram but is struggling to add a best fit line. They mention having access to the curve fitting toolbox but are unsure how to utilize it effectively for their needs in MATLAB 2010. Additionally, there is a query about plotting x,y data on a histogram in Mathematica, indicating a need for guidance on using the Histogram function to incorporate both data sets. The conversation highlights challenges in data visualization and the use of specific software tools for statistical analysis.
matt_crouch
Messages
157
Reaction score
1
Im analyzing some data from a previous student I am trying to plot a line of best fit over the histogram and hense find the value of the coefficiants

the files had to be loaded as -ascii so this is the code i have typed so far

x=load('filename.mat','-ascii'); mean(x); hist(x,300)

this then produces the graph how do i add a best fit line to this. I have the curve fit toolbox but don't seem to be able to use this to give me a plausable best fit. I am using Matlab 2010

any help would be appreciated
:)
 
Physics news on Phys.org
How to plot for x,y data on Histogram in Mathematica

hey, How to plot for x,y data on Histogram in Mathematica?
I saw The Histogram function is just ploting y data,
 

Similar threads

  • · Replies 9 ·
Replies
9
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 12 ·
Replies
12
Views
7K
  • · Replies 14 ·
Replies
14
Views
3K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 6 ·
Replies
6
Views
5K
  • · Replies 0 ·
Replies
0
Views
1K
  • · Replies 2 ·
Replies
2
Views
8K
  • · Replies 0 ·
Replies
0
Views
701
  • · Replies 16 ·
Replies
16
Views
3K