Plotting a best fit curve over a histogram

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 5K views
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,