c_ftcurvps(3NCARG)
π c_ftcurvps β bestie edition π
okay so this is the NCAR GRAPHICS manual page for c_ftcurvps, from the 3NCARG corner of the man-page universe. sit down, grab a strawberry π, we're computing a smoothing spline for periodic functions. no cap.
β¨ NAME β¨
c_ftcurvps β compute a smoothing spline for periodic functions.
π§ FUNCTION PROTOTYPE π§
int c_ftcurvps (int, float [], float [], float, int, float [], int,
float [], float []);
πΈ SYNOPSIS πΈ
int c_ftcurvps (n, xi, yi, p, dflg, d, m, xo, yo);
π DESCRIPTION π
like, meet the cast π:
nβ the number of input data points. (n > 1β fr fr, that's the vibe check.)xiβ an array holding the abscissae for the input function.yiβ an array holding the functional values of the input function. soyi[k]is the functional value atx[k]fork=0,n-1. πpβ the period of the function.dflgβ the switch that decides how we readd(more below, iykyk). ifdflg=0, thendis an array of lengthn(an error estimate for each input data value); ifdflg=1, thendis a scalar that serves as an error estimate for every single data item.dβ a user-specified value containing the observed weights.dmay either be an array or a scalar, depending on the value ofdflg.mβ the number of output values.xoβ contains the abscissae for the output values.yoβ contains the functional values for the smoothing spline ((yo[k]is the functional value atxo[k]fork=0,n-1). β¨
π RETURN VALUE π
c_ftcurvps returns an error value as per:
= 1ifnis less than 2.= 2ifsmtis negative.= 3ifepsis negative or greater than 1.= 4ifxvalues are not strictly increasing.= 5ifdis negative.= 6ifpis less than or equal toX(N)-X(1).
π₯ USAGE π₯
this function computes an interpolatory smoothing spline under tension through a sequence of functional values of a periodic function. iconic behavior honestly.
two parameters and one function argument are used to control the degree of smoothness β the parameters are smt and eps, and the function argument is d. π«Ά
the argument d is a value indicating the degree of confidence in the accuracy of the input function values β it should be an approximation of the standard deviation of error. effectively the value of d controls how close the smoothed curve comes to the input data points. if d is small, then the interpolated curve will pass close to the input data. the larger the value of d, the more freedom the smooth curve has in how close it comes to the input data values. π
the parameter smt is a more subtle global smoothing parameter; smt must be non-negative. for small values of smt, the curve approximates the tension spline and for larger values of smt, the curve is smoother. a reasonable value for smt is (float) n. π
the parameter eps controls the precision to which smt is interpreted; eps must be between 0. and 1. inclusive. a reasonable value for eps is sqrt( 2./(float) n ). β
c_ftcurvps is called after all of the desired values for control parameters have been set using the procedures c_ftseti, c_ftsetr, c_ftsetc. control parameters that apply to c_ftcurvps are: sig, smt, eps, sf2. π
the value for the parameter sig specifies the tension factor. values near zero result in a cubic spline; large values (e.g. 50) result in nearly a polygonal line. a typical value is 1. (the default). π
π¦ ACCESS π¦
to use c_ftcurvps, load the NCAR Graphics library ngmath. that's it bestie, go off.
π SEE ALSO π
fitgrid_paramsc_ftsetic_ftsetrc_ftsetc
complete documentation for Fitgrid is available at URL http://ngwww.ucar.edu/ngdoc/ng/ngmath/fitgrid/fithome.html
π COPYRIGHT π
Copyright (C) 2000 University Corporation for Atmospheric Research
The use of this Software is governed by a License Agreement.
lowkey legal but make it cute: that license agreement is not optional, bestie. read it. π«Ά
k that's the whole page!! this was c_ftcurvps from the UNIX manual, March 1998, tagged c_ftcurvps(3NCARG) β mwah, slay, periodt π
β¨πΈ
π¦ where this page comes from
- epel 9: ncl-devel 6.6.2-59.el9 Β· LicenseRef-Callaway-BSD
- fedora 43: ncl-devel 6.6.2-58.fc43 Β· LicenseRef-Callaway-BSD
- fedora 44: ncl-devel 6.6.2-62.fc44 Β· LicenseRef-Callaway-BSD
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms