Get the equation of the graph plotted into the workspace OR how the equation can be generated explicitly ?
    2 Ansichten (letzte 30 Tage)
  
       Ältere Kommentare anzeigen
    
    Meera chandran
 am 4 Okt. 2018
  
    
    
    
    
    Bearbeitet: jonas
      
 am 4 Okt. 2018
            I obtained the equation of a graph plotted using the Basic fitting option ( Plot the graph-> Tools-->Basic Fitting-->show equations). But, can some one explain how these equations are calculated( say, for a 3rd degree polynomial function)? Is there a code available for this? Any ideas is highly appreciated.
0 Kommentare
Akzeptierte Antwort
  jonas
      
 am 4 Okt. 2018
        
      Bearbeitet: jonas
      
 am 4 Okt. 2018
  
      Let x and y be your data.
Use polyfit to fit coeffecients to your data using a third order polynomial.
P = polyfit(x, y, 3)
Evaluate the data at points xe
xe = ... 
ye = polyval(p, xe)
You can then plot xe and ye alongside your data.
If what you are really looking for is how the fitting is performed inside of polyfit, then read about least-square fitting
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
				Mehr zu Spline Postprocessing finden Sie in Help Center und File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!