how do I extract the spline model and coefficients after I use fit with cubicinterp?
    2 Ansichten (letzte 30 Tage)
  
       Ältere Kommentare anzeigen
    
I am using the fit() function to fit a cubic spline model to a set of 3D points. I then want to find out the details of the spline model generated and its coefficients so I can use that in further processing. I do this:
        sfL = fit([vxL, vyL],vzL,'cubicinterp');
        coeffsL = coeffvalues(sfL);
But do not know how to extract anything from coeffsL. How do I go about this? Previously I had done a polynomial fit to the same data as follows:
        sf = fit([vx, vy],vz,'poly22');
        coeffs(iVhi,:) = coeffvalues(sf);
Here I understood what 'poly22' meant from the documentation, and could extract the coeffs easily and use them to evaluate the polynomial for any point in parameter space.
0 Kommentare
Antworten (1)
  John D'Errico
      
      
 am 6 Jun. 2017
        
      Bearbeitet: John D'Errico
      
      
 am 6 Jun. 2017
  
      A spline fit is not a simple function you can write down easily.
You can evaluate it at any point, and you are always given tools to do that evaluation. But you won't find anything useful by seeing analytical expressions of those functions. It would be messy as hell, and mean absolutely nothing to you.
Sorry.
0 Kommentare
Siehe auch
Kategorien
				Mehr zu Linear and Nonlinear Regression finden Sie in Help Center und File Exchange
			
	Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

