function interpgui(arg1,arg2) %INTERPGUI Behavior of interpolating functions. % Demonstrates interpolation by a piecewise linear interpolant, % a polynomial, a spline, and a shape preserving Hermite cubic. % INTERPGUI(x,y) starts with a plot of y vs. x. % INTERPGUI(y) starts with equally spaced x's. % INTERPGUI(n) starts with y = zeros(1,n). % INTERPGUI with no arguments starts with eight zeros. % The interpolation points can be varied with the mouse. % If x is specified, it remains fixed. % % See also SPLINETX, PCHIPTX, POLYINTERP, PIECELIN. if nargin == 0 | isnumeric(arg1) % Interpret arguments if nargin == 0 % interpgui with no arguments n = 8; x = 1:n; y = zeros(1,n); elseif length(arg1) == 1 % interpgui(n) n = arg1; x = 1:n; y = zeros(1,n); elseif nargin == 1 % interpgui(y)
Matlab interpgui
最新推荐文章于 2021-03-22 03:51:18 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)