Matlab code fitting a line to a histogram

  • #1
161
1
Im analyzing some data from a previous student im 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 dont seem to be able to use this to give me a plausable best fit. I am using Matlab 2010

any help would be appreciated
:)
 

Answers and Replies

Related Threads on Matlab code fitting a line to a histogram

  • Last Post
Replies
7
Views
13K
  • Last Post
Replies
1
Views
1K
  • Last Post
Replies
14
Views
4K
  • Last Post
Replies
0
Views
5K
  • Last Post
Replies
1
Views
10K
  • Last Post
Replies
1
Views
4K
  • Last Post
Replies
3
Views
2K
  • Last Post
Replies
0
Views
4K
Replies
1
Views
4K
Replies
1
Views
1K
Top