plateform stringclasses 1
value | repo_name stringlengths 13 113 | name stringlengths 3 74 | ext stringclasses 1
value | path stringlengths 12 229 | size int64 23 843k | source_encoding stringclasses 9
values | md5 stringlengths 32 32 | text stringlengths 23 843k |
|---|---|---|---|---|---|---|---|---|
github | foucart/Basc-master | cumsum.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebtech/cumsum.m | 2,631 | utf_8 | f84987b5bd8c5470751278785e3c1aed | function f = cumsum(f, dim)
%CUMSUM Indefinite integral of a CHEBTECH.
% CUMSUM(F) is the indefinite integral of the CHEBTECH F with the constant of
% integration chosen so that F(-1) = 0.
%
% CUMSUM(F, 2) will take cumulative sum over the columns of F which is an
% array-valued CHEBTECH.
%
% See also DIFF, S... |
github | foucart/Basc-master | roots.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebtech/roots.m | 13,562 | utf_8 | a4e356562469e773b061ed4142faa111 | function out = roots(f, varargin)
%ROOTS Roots of a CHEBTECH in the interval [-1,1].
% ROOTS(F) returns the real roots of the CHEBTECH F in the interval [-1,1].
%
% ROOTS(F, PROP1, VAL1, PROP2, VAL2, ...) modifies the default ROOTS
% properties. The PROPs (strings) and VALs may be any of the following:
%
% AL... |
github | foucart/Basc-master | times.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebtech/times.m | 4,786 | utf_8 | f1354fef8b6437e514a4d3bd1bb693d9 | function f = times(f, g, varargin)
%.* CHEBTECH multiplication.
% F.*G multiplies CHEBTECH objects F and G or a CHEBTECH by a scalar if either
% F or G is a scalar.
%
% If F is an array-valued CHEBTECH, then F.*C is supported if C is a row
% vector of doubles with the same number of columns as F.
%
% See also... |
github | foucart/Basc-master | plateauCheck.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebtech/plateauCheck.m | 6,655 | utf_8 | 45caae94074b519aa18d17a7450352c3 | function [ishappy, epsLevel, cutoff] = plateauCheck(f, values, pref)
%PLATEAUCHECK Attempt to trim trailing Chebyshev coefficients in a CHEBTECH.
% [ISHAPPY, EPSLEVEL, CUTOFF] = PLATEAUCHECK(F, VALUES) returns an estimated
% location, the CUTOFF, at which the CHEBTECH F could be truncated. One of two
% criteria... |
github | foucart/Basc-master | clenshaw.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebtech/clenshaw.m | 3,938 | utf_8 | 75fbfb7da2addbac505ea2d3ad854911 | function y = clenshaw(x, c)
%CLENSHAW Clenshaw's algorithm for evaluating a Chebyshev polynomial.
% If C is a column vector, Y = CLENSHAW(X, C) evaluates the Chebyshev
% expansion
%
% Y = P_N(X) = C(1)*T_N(X) + ... + C(N)*T_1(X) + C(N+1)*T_0(X)
%
% using Clenshaw's algorithm.
%
% If C is an (N+1) x M matr... |
github | foucart/Basc-master | linopV4Check.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebtech/linopV4Check.m | 5,734 | utf_8 | e15544f04c31c0b3bf9d9ec28a7abbc4 | function [ishappy, epsLevel, cutoff] = linopV4Check(f, values, pref)
%LINOPV4CHECK Attempt to trim trailing Chebyshev coefficients in a CHEBTECH.
% [ISHAPPY, EPSLEVEL, CUTOFF] = LINOPV4CHECK(F, VALUES) returns an estimated
% location, the CUTOFF, at which the CHEBTECH F could be truncated. It's
% based on the s... |
github | foucart/Basc-master | minandmax.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebtech/minandmax.m | 3,093 | utf_8 | 0bd54e45c8f2fdbc0c33d1b5013cfa5f | function [vals, pos] = minandmax(f)
%MINANDMAX Global minimum and maximum on [-1,1].
% VALS = MINANDMAX(F) returns a 2-vector VALS = [MIN(F); MAX(F)] with the
% global minimum and maximum of the CHEBTECH F on [-1,1]. If F is a
% array-valued CHEBTECH, VALS is a 2-by-N matrix, where N is the number of
% colum... |
github | foucart/Basc-master | qr.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebtech/qr.m | 6,591 | utf_8 | fc065e01d5d30bd65c20b275985ed5a9 | function [Q, R, E] = qr(f, outputFlag, methodFlag)
%QR QR factorisation of an array-valued CHEBTECH.
% [Q, R] = QR(F) returns a QR factorisation of F such that F = Q*R, where the
% CHEBTECH Q is orthogonal (with respect to the continuous L^2 norm on [-1,1])
% and of the same size as F and R is an m x m upper-tr... |
github | foucart/Basc-master | diff.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebtech/diff.m | 4,229 | utf_8 | aacbce5126b350be3054cea47717cbdb | function f = diff(f, k, dim)
%DIFF Derivative of a CHEBTECH.
% DIFF(F) is the derivative of F and DIFF(F, K) is the Kth derivative.
%
% DIFF(F, K, DIM), where DIM is one of 1 or 2, takes the Kth difference along
% dimension DIM. For DIM = 1, this is the same as above. For DIM = 2, this
% is a finite differenc... |
github | foucart/Basc-master | plotcoeffs.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebtech/plotcoeffs.m | 3,873 | utf_8 | 7697f65232b9913143f50ccce48ccab3 | function varargout = plotcoeffs(f, varargin)
%PLOTCOEFFS Display Chebyshev coefficients graphically.
% PLOTCOEFFS(F) plots the Chebyshev coefficients of a CHEBTECH F on a semilogy
% scale. A horizontal line at the EPSLEVEL of F is also plotted. If F is an
% array-valued CHEBTECH then a curve is plotted for each... |
github | foucart/Basc-master | splitTreeEIG.m | .m | Basc-master/basc_v1.0/chebfun-master/@stringParser/splitTreeEIG.m | 3,381 | utf_8 | 0848fd3b013912009b1050062f24274b | function [newTree, lambdaTree, lambdaSign] = splitTreeEIG(treeIn)
%SPLITTREEEIG Split a syntax tree, specific to EIG problems.
% [NEWTREE, LAMBDATREE, LAMBDASIGN] = SPLITTREEEIG(TREEIN) splits the syntax
% tree TREEIN into two trees, NEWTREE and LAMBDATREE. LAMBDATREE contains the
% syntax tree that the eigenv... |
github | foucart/Basc-master | parser.m | .m | Basc-master/basc_v1.0/chebfun-master/@stringParser/parser.m | 22,108 | utf_8 | f4218d3db1624b32e108ee4b223c4c7a | function parseOut = parser(lexIn)
%STRCONVPARSER LL(1) parser for mathematical expressions
% PARSEOUT = STRCONVPARSER(LEXIN) returns a syntax tree of expressions so that
% it can be converted to a format Chebfun is able to work with. The input,
% LEXIN, is the output of the method STRCONVLEXER(), and is a cel... |
github | foucart/Basc-master | parSimp.m | .m | Basc-master/basc_v1.0/chebfun-master/@stringParser/parSimp.m | 6,515 | utf_8 | 7155e43aee4dc4675d86ba33fb006b43 | function str = parSimp(str)
%PARSIMP Remove unnecessary parentheses from string inputs.
% STROUT = PARSIMP(STRIN) returns the string STROUT, obtained by doing some
% basic simplifications of the string STRIN, attempting to remove unnecessary
% parenthesis, zeros, and consecutive +/- pairs.
% Copyright 20... |
github | foucart/Basc-master | lexer.m | .m | Basc-master/basc_v1.0/chebfun-master/@stringParser/lexer.m | 15,915 | utf_8 | c90be76884bce765bf14e17f19658891 |
function [out, varNames, pdeVarNames, eigVarNames, indVarNames] = ...
lexer(str, problemType)
%LEXER Lexer for string expression in CHEBFUN
% [OUT, VARNAMES, INDVARNAME, PDEVARNAMES, EIGVARNAMES, INDVARNAMES] =
% LEXER(STR)
% Performs a lexical analysis on the string STR.
% Here:
% STR: ... |
github | foucart/Basc-master | splitTreePDE.m | .m | Basc-master/basc_v1.0/chebfun-master/@stringParser/splitTreePDE.m | 3,063 | utf_8 | d89e9283bae2e5ac965e710d51f3ad90 | function [newTree, pdeSign] = splitTreePDE(treeIn)
%SPLITTREEPDE Split a syntax tree, specific to PDE problems.
% [NEWTREE, PDESIGN] = SPLITTREPDE(TREEIN) goes through the syntax tree
% TREEIN, and isolates the part where the PDE variable, e.g. u_t, appears.
% splits the syntax tree TREEIN into two trees, NEWTR... |
github | foucart/Basc-master | pref2inf.m | .m | Basc-master/basc_v1.0/chebfun-master/@stringParser/pref2inf.m | 7,028 | utf_8 | a0fcac70f2b7e6a462ba0112978fb8d1 | function [infixOut, notaVAR] = pref2inf(prefixIn)
%PREF2INF Convert an expression on prefix form to infix form
% [INFIXOUT, NOTAVAR] = PREF2INF(PREFIXIN) goes recursively through the
% expression PREFIXIN, which is on prefix form. The output, INFIXOUT, is a
% string, representing the expression on infix form. N... |
github | foucart/Basc-master | chebmatrix.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebmatrix/chebmatrix.m | 25,485 | utf_8 | 0070e3677d1f4ed5efb72d2e332edcc3 | classdef (InferiorClasses = {?chebfun, ?operatorBlock, ?functionalBlock}) chebmatrix
%CHEBMATRIX Compound matrix for operators, CHEBFUNs, and scalars.
% A CHEBMATRIX contains blocks that are linear operators, functionals,
% CHEBFUNs, or scalars. They are used to tie together multiple functions, or
% functions a... |
github | foucart/Basc-master | mtimes.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebmatrix/mtimes.m | 2,532 | utf_8 | 251d11425346a29bed6418729bf5a9bf | function C = mtimes(A, B)
%* Composition of CHEBMATRICES.
%
% See also MPOWER.
% Copyright 2014 by The University of Oxford and The Chebfun Developers.
% See http://www.chebfun.org/ for Chebfun information.
% Scalar operand is scalar*identity. But it's faster to interpret it as a
% special case.
if ( isnumeric(A)... |
github | foucart/Basc-master | plotData.m | .m | Basc-master/basc_v1.0/chebfun-master/@deltafun/plotData.m | 2,299 | utf_8 | cf90f95c18f22189d1cd692c866ea9af | function data = plotData(f, g, h)
%PLOTDATA Useful data values for plotting a DELTAFUN object.
% DATA = PLOTDATA(F) extracts PLOTDATA of the funPart of F
% and then appends to it by the data used for delta function plotting.
%
% DATA = PLOTDATA(F, G) is similar.
%
% DATA = PLOTDATA(F, G, H) ignores all delta... |
github | foucart/Basc-master | times.m | .m | Basc-master/basc_v1.0/chebfun-master/@deltafun/times.m | 3,007 | utf_8 | 117c232e7083cc2e6b00d96c236bb625 | function h = times(f, g)
%.* Multiply DELTAFUNS with DELTAFUNS.
% Copyright 2014 by The University of Oxford and The Chebfun Developers.
% See http://www.chebfun.org/ for Chebfun information.
% Note: This method will be called only if both F and G are DELTAFUNS or at the
% most one of F and G is a scalar double.
%... |
github | foucart/Basc-master | deltafun.m | .m | Basc-master/basc_v1.0/chebfun-master/@deltafun/deltafun.m | 11,821 | utf_8 | 7fbc87d8c3a09469dd6e85c343b285d8 | classdef (InferiorClasses = {?bndfun, ?unbndfun}) deltafun < fun
%DELTAFUN Class for distributions based on Dirac-deltas on arbitrary intervals
%
% Class for approximating generalized functions on the interval [a, b].
% The smooth or classical part of the function is approximated by a
% CLASSICFUN object w... |
github | foucart/Basc-master | innerProduct.m | .m | Basc-master/basc_v1.0/chebfun-master/@deltafun/innerProduct.m | 2,458 | utf_8 | 168cd63aa6bdcf93966bd236e4ad8f1e | function out = innerProduct(f, g)
%INNERPRODUCT Compute the inner product of two DELTAFUN objects.
% INNERPRODUCT(F, G) is the inner-product of two DELTAFUN object F and G.
% Copyright 2014 by The University of Oxford and The Chebfun Developers.
% See http://www.chebfun.org/ for Chebfun information.
%% Trivial ca... |
github | foucart/Basc-master | fliplr.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebfun/fliplr.m | 1,032 | utf_8 | 943b9f9c812cede3e94f6d6f1f6006a7 | function F = fliplr(F)
%FLIPLR Flip/reverse a CHEBFUN.
% G = FLIPLR(F), where F is a row CHEBFUN, returns a CHEBFUN G with the same
% domain as F but reversed; that is, G(x) = F(a+b-x), where the domain is
% [a,b].
%
% FLIPLR(F), where F is an array-valued column CHEBFUN or a quasimatrix,
% reverses the ord... |
github | foucart/Basc-master | get.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebfun/get.m | 15,087 | utf_8 | c860ffe96be5972efd961deef234814d | function out = get(f, prop, simpLevel)
%GET GET method for the CHEBFUN class.
% P = GET(F, PROP) returns the property P specified in the string PROP from
% the CHEBFUN F. Valid entries for the string PROP are:
% 'domain' - The domain of definition of F.
% 'ends'
% 'funs' - The ... |
github | foucart/Basc-master | cumsum.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebfun/cumsum.m | 2,953 | utf_8 | 73f7e8d365590a12bfd7528a6de6de02 | function f = cumsum(f, m, dim)
%CUMSUM Indefinite integral of a CHEBFUN.
% G = CUMSUM(F) is the indefinite integral of the column CHEBFUN F. G will
% typically be normalised so that G(F.domain(1)) = 0. The exception to this is
% when computing indefinite integrals of functions whose indefinite integrals
% hav... |
github | foucart/Basc-master | epslevel.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebfun/epslevel.m | 1,306 | utf_8 | b1084523410aa08eae8bac31125467ac | function out = epslevel(F, ignoreUnhappy) %#ok<INUSD>
%EPSLEVEL Accuracy estimate of a CHEBFUN object.
% EPSLEVEL(F) returns an estimate of the relative error in the CHEBFUN F. This
% is defined as the maximum of the product of the local vscales and epslevels,
% divided by the global vscale.
%
% EPSLEVEL(F, '... |
github | foucart/Basc-master | defineInterval.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebfun/defineInterval.m | 4,979 | utf_8 | cccb109722c29119dc4850203bc778e6 | function f = defineInterval(f, subInt, g)
%DEFINEINTERVAL Supply a new definition for a CHEBFUN on a subinterval.
% F = DEFINEINTERVAL(F, S, G) redefines the CHEBFUN F by the CHEBFUN or double
% G in the interval [S(1), S(end)] in F.DOMAIN. If F is array-valued then G
% should have the same number of columns, i... |
github | foucart/Basc-master | plot.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebfun/plot.m | 14,760 | utf_8 | 2899b1b9700b0765b7e6320b4ad982ee | function varargout = plot(varargin)
%PLOT Basic linear plot for CHEBFUN objects.
% PLOT(F) plots the CHEBFUN object F in the interval where it is defined. If F
% is complex valued, PLOT(F) is equivalent to PLOT(real(F), imag(F)).
%
% PLOT(F, G) plots the CHEBFUN G versus the CHEBFUN F. Quasimatrices and
% arr... |
github | foucart/Basc-master | roots.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebfun/roots.m | 6,406 | utf_8 | 643ad2c150f16c5a3ec2c4bfe5198149 | function r = roots(F, varargin)
%ROOTS Roots of a CHEBFUN.
% ROOTS(F) returns the roots of F in its domain of definition. By default,
% roots are returned at jumps in F which pass through zero, and if F is
% identically zero on a part of its domain, then a single root is returned at
% the midpoint. Each of th... |
github | foucart/Basc-master | isnan.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebfun/isnan.m | 706 | utf_8 | a6d56e834c35ef5a62804043014489c2 | function out = isnan(F)
%ISNAN Test if a CHEBFUN is NaN.
% ISNAN(F) returns TRUE if F has any NaN values and FALSE otherwise.
% Copyright 2014 by The University of Oxford and The Chebfun Developers.
% See http://www.chebfun.org/ for Chebfun information.
out = false;
% Empty CHEBFUNs are not NaN.
if ( isempty(F) ... |
github | foucart/Basc-master | chebfun.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebfun/chebfun.m | 39,564 | utf_8 | b8769c61d5686625d5a61d843a0ae9ba | classdef chebfun
%CHEBFUN CHEBFUN class for representing functions on [a,b].
%
% Class for approximating functions defined on finite, semi-infinite, or
% doubly-infinite intervals [a,b]. Functions may be smooth, piecewise smooth,
% weakly singular, or blow up on the interval.
%
% CHEBFUN(F) constructs a CHEBFUN... |
github | foucart/Basc-master | remez.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebfun/remez.m | 14,258 | utf_8 | d94693d6bb6111b24ae3ad863086ca2b | function varargout = remez(f, varargin)
%REMEZ Best polynomial or rational approximation.
% P = REMEZ(F, M) computes the best polynomial approximation of degree M to
% the CHEBFUN F in the infinity norm using the Remez algorithm.
%
% [P, Q] = REMEZ(F, M, N) computes the best rational approximation P/Q of type
%... |
github | foucart/Basc-master | mat2cell.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebfun/mat2cell.m | 3,276 | utf_8 | f0dd233bebbc071df0384a86755fa4ed | function G = mat2cell(F, M, N)
%MAT2CELL Convert an array-valued CHEBFUN to a cell array of CHEBFUN objects.
% G = MAT2CELL(F, C) breaks up the array-valued CHEBFUN F into a cell array G
% of CHEBFUN objects. C is a vector of sizes and must sum to the number of
% components of F (i.e., the number of columns (ro... |
github | foucart/Basc-master | cf.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebfun/cf.m | 10,690 | utf_8 | 7ebd161c6348f334fc767ab11a752a41 | function [p, q, r, s] = cf(f, m, n, M)
%CF Caratheodory-Fejer approximation
% [P, Q, R_HANDLE] = CF(F, M, N) computes a type (M, N) rational CF
% approximant to CHEBFUN F defined on [a, b], which must consist of just a
% single FUN. P and Q are CHEBFUNs representing the numerator and denominator
% polynomials... |
github | foucart/Basc-master | nextpow2.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebfun/nextpow2.m | 1,664 | utf_8 | 72a5aebe85d7c69f78c659478179203e | function g = nextpow2(f, pref)
%NEXTPOW2 Base 2 power of a CHEBFUN.
% P = NEXTPOW2(N) returns the first P such that 2.^P >= abs(N). It is often
% useful for finding the nearest power of two sequence length for FFT
% operations.
%
% See also LOG2, POW2.
% Copyright 2014 by The University of Oxford and The Chebf... |
github | foucart/Basc-master | atan2.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebfun/atan2.m | 2,499 | utf_8 | f3bb41cc8f40a2492e81b3588b326d65 | function p = atan2(y, x, pref)
%ATAN2 Four quadrant inverse tangent of a CHEBFUN.
% ATAN2(Y, X) is the four quadrant arctangent of the real parts of the CHEBFUN
% objects X and Y. -pi <= ATAN2(Y, X) <= pi.
%
% ATAN2 is defined as:
% { atan(y/x), x > 0
% { atan(y/... |
github | foucart/Basc-master | unwrap.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebfun/unwrap.m | 1,942 | utf_8 | f16fea7951c419a86287e63663d3ed4a | function p = unwrap(p, jumpTol)
%UNWRAP Unwrap CHEBFUN phase angle.
% UNWRAP(P) unwraps radian phases P by changing absolute jumps greater than or
% equal to pi to their 2*pi complement. It unwraps along the continuous
% dimension of P and leaves the first FUN along this dimension unchanged.
%
% UNWRAP(P, TOL... |
github | foucart/Basc-master | compose.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebfun/compose.m | 11,708 | utf_8 | ed76e21739f7ee1718ca2702c992d8a2 | function f = compose(f, op, g, pref)
%COMPOSE Composition of CHEBFUN objects.
% COMPOSE(F, OP) returns a CHEBFUN representing OP(F), where F is also a
% CHEBFUN object and OP is a function handle.
%
% COMPOSE(F, OP, G) returns OP(F, G), where F and G are CHEBFUN objects and OP
% is a function handle. The domai... |
github | foucart/Basc-master | plot3.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebfun/plot3.m | 4,487 | utf_8 | 578c4a7ea57c85ecabef6c1c9dc08229 | function varargout = plot3(f, g, h, varargin)
%PLOT3 Plot for CHEBFUN objects in 3-D space.
% PLOT3() is a three-dimensional analogue of PLOT().
%
% PLOT3(X, Y, Z), where X, Y, and Z are three CHEBFUN objects, plots a line in
% 3-space. X, Y, and Z may be array-valued, but must have the same number of
% colum... |
github | foucart/Basc-master | measure.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebfun/measure.m | 7,354 | utf_8 | a343098ae21b15a5902a6a0a0ee684f8 | function measure = measure(f, a, b)
%MEASURE Measure of a CHEBFUN F on an interval.
% MEASURE(F, A, B) computes the number F^-1([a,b]) i.e., the measure of
% the set which is mapped to values between A and B under the mapping F.
% MEASURE(F, [A, B]) is an equivalent syntax.
% Copyright 2014 by The University ... |
github | foucart/Basc-master | flipud.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebfun/flipud.m | 1,341 | utf_8 | 93d11c5d08a595a9685b24819bdfb0fd | function F = flipud(F)
%FLIPUD Flip/reverse a CHEBFUN.
% G = FLIPUD(F), where F is a column CHEBFUN, returns a CHEBFUN G with the
% same domain as F but reversed; that is, G(x) = F(a+b-x), where the domain is
% [a,b].
%
% FLIPUD(F), where F is an array-valued row CHEBFUN or a quasimatrix, reverses
% the ord... |
github | foucart/Basc-master | besselk.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebfun/besselk.m | 1,402 | utf_8 | af43f255722cae795f9f04f4e65aeec4 | function F = besselk(nu, F, scale, pref)
%BESSELK Modified Bessel function of second kind of a CHEBFUN.
% K = BESSELK(NU, F) computes the modified Bessel function of second kind
% K_NU(F) of the nonzero CHEBFUN F. If F passes through the origin in its
% domain, then an error is returned. The order NU need not b... |
github | foucart/Basc-master | power.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebfun/power.m | 6,356 | utf_8 | c040ef24785a252c4a2235eeab042db3 | function g = power(f, b, pref)
%.^ CHEBFUN power.
% F.^G returns a CHEBFUN F to the scalar power G, a scalar F to the CHEBFUN
% power G, or a CHEBFUN F to the CHEBFUN power G. F and or G may be complex.
%
% H = POWER(F, G) is called for the syntax 'F .^ G'.
%
% See also SQRT, COMPOSE.
% Copyright 2014 by The U... |
github | foucart/Basc-master | isreal.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebfun/isreal.m | 906 | utf_8 | 30a5a28831efca1212bdcc3375abfc0b | function out = isreal(F)
%ISREAL True for real-valued CHEBFUN object.
% ISREAL(F) returns logical true if F does not have an imaginary part and
% false otherwise.
%
% Unlike the built in MATLAB function, ~ISREAL(F) does not detect CHEBFUN
% objects that have an all zero imaginary part.
%
% See also REAL, IMAG... |
github | foucart/Basc-master | conv.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebfun/conv.m | 7,201 | utf_8 | af5ed42785f2c2ef967bbd52de0378a3 | function h = conv(f, g, varargin)
%CONV Convolution of CHEBFUN objects.
% H = CONV(F, G) produces the convolution of CHEBFUN objects F and G:
% -
% /
% H(x) = | F(t) G(x-t) dt, x in [a + c, b + d]
% /
% -
% where domain(F... |
github | foucart/Basc-master | sum.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebfun/sum.m | 5,201 | utf_8 | 87d4acc1b043417b26856d573e2d31a1 | function out = sum(F, a, b)
%SUM Definite integral of a CHEBFUN.
% SUM(F) is the integral of a column CHEBFUN F over its domain of definition.
%
% SUM(F, A, B), where A and B are scalars, integrates a column CHEBFUN F over
% [A, B], which must be a subdomain of F.domain:
%
% B
% ... |
github | foucart/Basc-master | chebellipseplot.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebfun/chebellipseplot.m | 4,321 | utf_8 | d05563fc08562b06f16622bdb3f918ce | function varargout = chebellipseplot(u, varargin)
%CHEBELLIPSEPLOT Plot the Bernstein (aka Chebyshev) ellipses.
% CHEBELLIPSEPLOT(U) plots Bernstein ellipses in the complex plane for each
% piecewise part of U, with foci at points in U.domain and semi-minor and
% major axes summing to rho(k) = C*exp(abs(log(EPS... |
github | foucart/Basc-master | airy.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebfun/airy.m | 1,749 | utf_8 | c7f78b3e70c8d07905259d2af5b02977 | function F = airy(K, F, scale, pref)
%AIRY Airy function of a CHEBFUN.
% AIRY(F) returns the Airy function Ai(F) of a CHEBFUN F.
%
% AIRY(K, F) returns various Airy functions specified by K:
% 0 - (default) is the same as airy(Z)
% 1 - returns the derivative, Ai'(Z)
% 2 - returns the Airy function of ... |
github | foucart/Basc-master | definePoint.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebfun/definePoint.m | 2,596 | utf_8 | 22b457cc5fee37247d710aa9c2225012 | function f = definePoint(f, s, v)
%DEFINEPOINT Supply new definition for a CHEBFUN at a point or set of points.
% F = DEFINEPOINT(F, S, V) redefines the CHEBFUN F to take the values V at the
% points S in F.DOMAIN. If F is a scalar-valued CHEBFUN, then S and V should
% be vectors of the same length. If F is an ... |
github | foucart/Basc-master | ellipj.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebfun/ellipj.m | 3,698 | utf_8 | 259201ae1f74a45f0929bee1ed52d0b7 | function [sn, cn, dn] = ellipj(u, m, pref)
%ELLIPJ Jacobi elliptic functions.
% [SN, CN, DN] = ELLIPJ(U, M) returns CHEBFUNS for the compositions Sn(U)
% Cn(U), and Dn(U), where Sn, Cn, and Dn are the Jacobi elliptic functions
% with parameter M. U may be a scalar or a CHEBFUN, and M must be a CHEBFUN
% or sc... |
github | foucart/Basc-master | parsePlotStyle.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebfun/parsePlotStyle.m | 4,332 | utf_8 | 666d52c3b77d7462a0d85c7ba6b1dbc0 | function [lineStyle, pointStyle, jumpStyle, deltaStyle, out] = parsePlotStyle(varargin)
%PARSEPLOTSTYLE Parse inputs to PLOT. Extract 'lineWidth', etc.
% [L, P, J, D, OTHER] = PARSEPLOTSTYLE(VARARGIN) parses the inputs VARARGIN and
% strips out inputs to the MATLAB/PLOT() that should only be in cluded once.
% F... |
github | foucart/Basc-master | isfinite.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebfun/isfinite.m | 684 | utf_8 | 91ce4e4c1c627658e5232fcabb662656 | function out = isfinite(F)
%ISFINITE Test if a CHEBFUN is bounded.
% ISFINITE(F) returns FALSE if F has any infinite values and TRUE otherwise.
% Copyright 2014 by The University of Oxford and The Chebfun Developers.
% See http://www.chebfun.org/ for Chebfun information.
out = zeros(1, numel(F));
for k = 1:numel(... |
github | foucart/Basc-master | any.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebfun/any.m | 2,457 | utf_8 | da0d8b1202bbe31d77f0d393559bbcc2 | function a = any(f, dim)
%ANY True if any value of a CHEBFUN is nonzero. ANY ignores entries that are
% NaN (Not a Number).
% ANY(X, DIM), where X is an array-valued CHEBFUN, works down the dimension
% DIM. If DIM is the CHEBFUN (continuous) dimension, then ANY returns a
% logical column vector (or row) in... |
github | foucart/Basc-master | max.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebfun/max.m | 4,764 | utf_8 | 81611ef374b68dcc7305101df10d7bd2 | function [y, x] = max(f, flag, dim)
%MAX Maximum value of a CHEBFUN.
% MAX(F) and MAX(F, 'global') return the maximum value of the CHEBFUN F.
%
% [Y, X] = MAX(F) returns also a point X such that F(X) = Y.
%
% [Y, X] = MAX(F, 'local') returns not just the global maximum value but all
% of the local maxima.
%
%... |
github | foucart/Basc-master | iszero.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebfun/iszero.m | 1,152 | utf_8 | 39561fdec28be5845f8989842631c519 | function out = iszero(F, varargin)
%ISZERO Check if a CHEBFUN is identically zero on its domain.
% ISZERO(F) returns true if F is identically zero or empty on F.domain and
% false otherwise. If F is an array-valued CHEBFUN, the a true/false value is
% returned for each column.
% TODO: Document the TOL input.
... |
github | foucart/Basc-master | fred.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebfun/fred.m | 1,936 | utf_8 | dc03f6d8f044369e2a355433cd7d081c | function F = fred(k, v, onevar)
%FRED Compute the Fredholm integral with a specific kernel.
%
% F = FRED(K, V) computes the Fredholm integral with kernel K:
%
% (F*v)(x) = int( K(x,y)*v(y), y=a..b ),
%
% where [a b] = domain(V). The kernel function K(x,y) should be smooth for
% best results.
%
% K must b... |
github | foucart/Basc-master | interp1.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebfun/interp1.m | 3,419 | utf_8 | 836c017c6c059f88205ae8d66debe373 | function p = interp1(x, y, method, dom)
%INTERP1 CHEBFUN polynomial interpolant at any distribution of points.
% P = CHEBFUN.INTERP1(X, Y), where X and Y are vectors, returns the CHEBFUN P
% defined on the domain [X(1), X(end)] corresponding to the polynomial
% interpolant through the data Y(j) at points X(j).
... |
github | foucart/Basc-master | chebpade.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebfun/chebpade.m | 7,857 | utf_8 | 8a39099c914cf7fad49383d761e6fbde | function [p, q, r_handle] = chebpade(F, m, n, varargin)
%CHEBPADE Chebyshev-Pade approximation.
% [P, Q, R_HANDLE] = CHEBPADE(F, M, N) computes polynomials P and Q of degree
% M and N, respectively, such that the rational function P/Q is the type (M,
% N) Chebyshev-Pade approximation of type Clenshaw-Lord to th... |
github | foucart/Basc-master | minandmax.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebfun/minandmax.m | 5,251 | utf_8 | 0ea337837ff92c0d6416d795a66046c4 | function [y, x] = minandmax(f, flag, dim)
%MINANDMAX Minimum and maximum values of a CHEBFUN.
% Y = MINANDMAX(F) returns the range of the CHEBFUN F such that Y(1,1) =
% min(F) and Y(2,1) = max(F).
%
% [Y, X] = MINANDMAX(F) returns also points X such that F(X(j,1)) = Y(j,1), j
% = 1, 2.
%
% [Y, X] = MINANDMA... |
github | foucart/Basc-master | isequal.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebfun/isequal.m | 1,484 | utf_8 | b0cff56345fb90b8eaac8f204ab395fe | function out = isequal(f, g)
%ISEQUAL Equality test for two CHEBFUNs.
% ISEQUAL(F, G) returns logical 1 (TRUE) if the CHEBFUN objects F and G
% contain identical breakpoints and FUNS, and logical 0 (FALSE) otherwise.
%
% See also EQ.
% Copyright 2014 by The University of Oxford and The Chebfun Developers.
% See ... |
github | foucart/Basc-master | merge.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebfun/merge.m | 5,177 | utf_8 | d6429e43cbe05701af6a3679421ba499 | function [f, mergedPts] = merge(f, index, pref)
%MERGE Remove unnecessary breakpoints in from a CHEBFUN.
% F = MERGE(F, PREF) removes unnecessary breakpoints from a CHEBFUN F. In
% particular the kth breakpoint is removed if the resulting FUN on the
% interval [x_{k-1}, x_{k+1}] can be represented to the same a... |
github | foucart/Basc-master | join.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebfun/join.m | 2,579 | utf_8 | b7cc480c9c1101d2532ee4f35521a782 | function f = join(varargin)
%JOIN Join together two or more CHEBFUN objects.
% F = JOIN(F1, F2, ...) joins together the CHEBFUN objects F1, F2, ..., to
% create a piecewise CHEBFUN F on a larger domain. F1, F2, ... must all have
% the same transposition state; the output F will have the same transposition
% s... |
github | foucart/Basc-master | bessely.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebfun/bessely.m | 1,412 | utf_8 | e215fbecd809c80567f8fb66c73bc9f4 | function F = bessely(nu, F, scale, pref)
%BESSELY Bessel function of second kind of a CHEBFUN.
% Y = BESSELY(NU, F) computes the Bessel function of the second kind Y_NU(F)
% of the nonzero CHEBFUN F. The order NU need not be an integer but must be
% real. The argument F can be complex but must not pass through ... |
github | foucart/Basc-master | rdivide.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebfun/rdivide.m | 4,950 | utf_8 | ba46b878a82a5d4d621cb87076610e70 | function h = rdivide(f, g, pref)
%./ Pointwise CHEBFUN right divide.
% F./G returns a CHEBFUN that represents the function F(x)/G(x).
% If F and G are array-valued column (row) CHEBFUNs, they must have the same
% number of columns (rows).
%
% See also MRDIVIDE, TIMES.
% Copyright 2014 by The University of Oxfo... |
github | foucart/Basc-master | inv.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebfun/inv.m | 13,472 | utf_8 | b643f2dfb99c79f8db07b629a0994a19 | function g = inv(f, varargin)
%INV Invert a CHEBFUN.
% FINV = INV(F) attempts to compute the inverse of the monotonic CHEBFUN F.
%
% FINV = INV(..., 'ALGORITHM', ALGSTR) selects the algorithm used to compute
% the values of the inverse of F. Possible values for ALGSTR are:
% 'ROOTS' - Compute the inverse... |
github | foucart/Basc-master | disp.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebfun/disp.m | 3,968 | utf_8 | 9e5c39045e91ba0e822a36c7e879b779 | function disp(f)
%DISP Display a CHEBFUN object.
%
% See also DISPLAY.
% Copyright 2014 by The University of Oxford and The Chebfun Developers.
% See http://www.chebfun.org/ for Chebfun information.
% If the 'format loose' setting is enabled, we print additional linebreaks:
loose = strcmp(get(0, 'FormatSpacing'), '... |
github | foucart/Basc-master | constructor.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebfun/constructor.m | 9,809 | utf_8 | 5a4baa096c8887120473e379e920a787 | function [funs, ends] = constructor(op, dom, data, pref)
%CONSTRUCTOR CHEBFUN constructor.
% FUNS = CONSTRUCTOR(OP, DOM) constructs the piecewise components (known as
% "FUNS") used by a CHEBFUN object to represent the function OP on the
% interval DOM. OP must be a function_handle, string, numerical vector, or... |
github | foucart/Basc-master | legcoeffs.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebfun/legcoeffs.m | 3,736 | utf_8 | 778f285bed298e334cb8dc4ca5d77ca8 | function out = legcoeffs(f, varargin)
%LEGCOEFFS Legendre polynomial coefficients of a CHEBFUN.
% A = LEGCOEFFS(F, N) returns the first N coefficients in the Legendre
% series expansion of the CHEBFUN F, so that such that F approximately equals
% A(1) P_0(x) + ... + A(N) P_(N-1)(x), where P_N(x) denotes the
% ... |
github | foucart/Basc-master | qr.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebfun/qr.m | 5,107 | utf_8 | 72b9b0dc6bbfe16fdc23fe21449063e9 | function [Q, R] = qr(A, econ)
%QR QR factorization of an array-valued CHEBFUN.
% [Q, R] = QR(A) or QR(A, 0), where A is a column CHEBFUN with n columns,
% produces a column CHEBFUN Q with n orthonormal columns and an n x n upper
% triangular matrix R such that A = Q*R.
%
% The algorithm used is described in L... |
github | foucart/Basc-master | addBreaksAtRoots.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebfun/addBreaksAtRoots.m | 1,661 | utf_8 | a21d3962efcd96628bb562f661cbecca | function f = addBreaksAtRoots(f, tol)
%ADDBREAKSATROOTS Add breaks at appropriate roots of a CHEBFUN.
% ADDBREAKSATROOTS(F) introduces breakpoints at certain roots in the interior
% of the domain of a CHEBFUN F. In particular, breaks are introduced at each
% of the roots returned by ROOTS(F, 'nozerofun', 'nojum... |
github | foucart/Basc-master | abs.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebfun/abs.m | 1,066 | utf_8 | 1c743ad527f4e32dfc4a64606aa7993c | function F = abs(F, pref)
%ABS Absolute value of a CHEBFUN.
% ABS(F) is the absolute value of the CHEBFUN F.
%
% See also SIGN, ANGLE, UNWRAP, HYPOT.
% Copyright 2014 by The University of Oxford and The Chebfun Developers.
% See http://www.chebfun.org/ for Chebfun information.
% Trivial case: (F is empty)
if ( is... |
github | foucart/Basc-master | besselh.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebfun/besselh.m | 1,930 | utf_8 | 98af7b2f876094e5e07ac634f3816d82 | function F = besselh(nu, k, F, scale, pref)
%BESSELH Bessel function of third kind (Hankel function) of a CHEBFUN.
% H = BESSELH(NU, K, F), for K = 1 or 2, computes the Hankel function H1_NU(F)
% or H2_NU(F) of the nonzero CHEBFUN F. If F passes through the origin in its
% domain, then an error is returned. Th... |
github | foucart/Basc-master | min.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebfun/min.m | 4,767 | utf_8 | 2bcaf0b470bbf5823565ad3843d5bf63 | function [y, x] = min(f, flag, dim)
%MIN Minimum values of a CHEBFUN.
% MIN(F) and MIN(F, 'global') return the minimum value of the CHEBFUN F.
%
% [Y, X] = MIN(F) returns also a point X such that F(X) = Y.
%
% [Y, X] = MIN(F, 'local') returns not just the global minimum value but all
% of the local minima.
%
... |
github | foucart/Basc-master | besselj.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebfun/besselj.m | 1,546 | utf_8 | 00b9afddee9e8de37da2780b20958931 | function F = besselj(nu, F, scale, pref)
%BESSELJ Bessel function of first kind of a CHEBFUN.
% J = BESSELJ(NU, F) returns J_nu(F), i.e., is the Bessel function of the
% first kind, J_NU(Z) composed with the CHEBFUN object F. The order NU need
% not be an integer, but must be a real scalar. The CHEBFUN F can be... |
github | foucart/Basc-master | ellipke.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebfun/ellipke.m | 2,036 | utf_8 | 3b034a5f7e2bf7de316f543cf033c8f5 | function [k, e] = ellipke(m, pref)
%ELLIPKE Complete elliptic integral of a CHEBFUN.
% [K, E] = ELLIPKE(M) returns the value of the complete elliptic integrals of
% the first and second kinds, composed with the CHEBFUN M. As currently
% implemented, M is limited to 0 <= M <= 1.
%
% [K, E] = ELLIPKE(M, TOL) c... |
github | foucart/Basc-master | pde15s.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebfun/pde15s.m | 31,766 | utf_8 | 86cc02d5e330f60ce2c8b85c43843656 | function varargout = pde15s(pdeFun, tt, u0, bc, varargin)
%PDE15S Solve PDEs using Chebfun.
%
% UU = PDE15s(PDEFUN, TT, U0, BC) where PDEFUN is a handle to a function with
% arguments u, t, x, and D, TT is a vector, U0 is a CHEBFUN or a CHEBMATRIX,
% and BC is a CHEBOP boundary condition structure will solve th... |
github | foucart/Basc-master | simplify.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebfun/simplify.m | 1,650 | utf_8 | aaa8be0870151a27193216bbf332f330 | function F = simplify(F, tol)
%SIMPLIFY Simplify a CHEBFUN.
% G = SIMPLIFY(F) attempts to compute a CHEBFUN G which is a 'simplified'
% version of F in that length(G) <= length(F), but ||G - F|| is small in a
% relative sense: ||G - F|| < EPSLEVEL(G)*VSCALE(G). The relative error
% threshold tolerance is chosen b... |
github | foucart/Basc-master | volt.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebfun/volt.m | 2,175 | utf_8 | 03e41dbd10283fc4b97964b615cad51f | function F = volt(k, v, onevar)
%VOLT Compute the Volterra integral with a specific kernel.
%
% F = VOLT(K, V) computes the Volterra integral with kernel K:
%
% (F*v)(x) = int( K(x,y) v(y), y = a..x )
%
% where a is the left endpoint on the interval V is defined on. The kernel
% function K(x,y) should be s... |
github | foucart/Basc-master | feval.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebfun/feval.m | 5,336 | utf_8 | 1e8169a23a9808b79dd6af01c96bce4a | function out = feval(F, x, varargin)
%FEVAL Evaluate a CHEBFUN.
% FEVAL(F, X) evaluates a CHEBFUN F at the points in X. If F is a quasimatrix
% with columns F1, ..., FN, then the result will be [F1(X), ..., FN(X)], the
% horizontal concatenation of the results of evaluating each column at the
% points in X.
... |
github | foucart/Basc-master | sign.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebfun/sign.m | 1,105 | utf_8 | 17c13e0818e73e723da952407776cd67 | function F = sign(F, pref)
%SIGN Sign function of a CHEBFUN.
% G = SIGN(F) returns a piecewise constant CHEBFUN G such that G(x) = 1 in the
% interval where F(x) > 0, G(x) = -1 in the interval where F(x) < 0 and G(x) =
% 0 in the interval where F(x) = 0. Breakpoints in G are introduced at zeros
% of F.
%
% ... |
github | foucart/Basc-master | diff.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebfun/diff.m | 5,217 | utf_8 | cf9c9d19db3726000eb6e3bd874f05bd | function F = diff(F, n, dim)
%DIFF Differentiation of a CHEBFUN.
% DIFF(F), when F is a column CHEBFUN, computes a column CHEBFUN whose columns
% are the derivatives of the corresponding columns in F. At discontinuities,
% DIFF creates a Dirac delta with coefficient equal to the size of the jump.
% Dirac del... |
github | foucart/Basc-master | sinc.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebfun/sinc.m | 845 | utf_8 | 2344c3c4fe208a16f79507ba31ae936b | function F = sinc(F, pref)
%SINC Sinc function of a CHEBFUN.
% SINC(F) computes the sinc function of the CHEBFUN F, i.e.,
% sinc(F) := sin(F)/(F).
%
% SINC(F, PREF) does the same but uses the CHEBFUNPREF object PREF when
% computing the composition.
%
% Note that this definition of the SINC function di... |
github | foucart/Basc-master | plotcoeffs.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebfun/plotcoeffs.m | 4,106 | utf_8 | 4d1c6761ae3091532dabae3bc80f574e | function varargout = plotcoeffs(f, varargin)
%PLOTCOEFFS Display coefficients graphically.
% PLOTCOEFFS(F) plots the coefficients underlying the representation of a
% CHEBFUN F on a semilogy scale. A horizontal line at the epslevel of F is
% also plotted. If F is an array-valued CHEBFUN or has breakpoints, then... |
github | foucart/Basc-master | restrict.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebfun/restrict.m | 3,699 | utf_8 | 1c47131b5046b1ad7ce2f9f905a3e352 | function F = restrict(F, newDomain)
%RESTRICT Restrict a CHEBFUN object to a subinterval.
% G = RESTRICT(F, [S1, S2]) returns a CHEBFUN G defined on the interval [S1,
% S2] which agrees with F on that interval. Any interior breakpoints in
% F.DOMAIN within [S1, S2] are kept in G.DOMAIN.
%
% G = RESTRICT(F, S)... |
github | foucart/Basc-master | instantiate.m | .m | Basc-master/basc_v1.0/chebfun-master/@colloc/instantiate.m | 1,461 | utf_8 | 7408717eeb651837b89f833ac6568edf | function [M, S] = instantiate(disc)
%INSTANTIATE Convert a COLLOC discretization to discrete form.
% M = INSTANTIATE(DISC) converts each item DISC.SOURCE to discrete form
% using the information in discretization DISC. The result M is return a cell
% array if DISC.SOURCE has more than one component.
%
% [M, S... |
github | foucart/Basc-master | reduce.m | .m | Basc-master/basc_v1.0/chebfun-master/@colloc/reduce.m | 2,582 | utf_8 | c985bf4079f2caee5c5b34a822b6d0a3 | function [PA, P, PS] = reduce(disc, A, S)
%REDUCE Dimension reduction for operator matrix.
% PA = REDUCE(DISC, A) reduces the row dimension of each block column in the
% cell array A (which is typically a discretization of DISC.SOURCE) so that
% the reduced discretization, PA, can be formed as a matrix. In par... |
github | foucart/Basc-master | bndfun.m | .m | Basc-master/basc_v1.0/chebfun-master/@bndfun/bndfun.m | 7,287 | utf_8 | 742b19c276fe136ddb8b5acaac0b9e6c | classdef bndfun < classicfun
%BNDFUN Represent global functions on a bounded interval [a, b].
%
% Class for representing global functions on a bounded interval [a, b].
% Functions are approximated via a ONEFUN object, which lives on the interval
% [-1, 1], stored in the BNDFUN. Forward and inverse maps stored i... |
github | foucart/Basc-master | plotData.m | .m | Basc-master/basc_v1.0/chebfun-master/@bndfun/plotData.m | 1,990 | utf_8 | 3edb63d854f0362a14a22f57ddd01eb5 | function data = plotData(f, g, h)
%PLOTDATA Useful data values for plotting a BNDFUN object.
% DATA = PLOTDATA(F) returns a struct containing data that can be used for
% plotting F. In particular, DATA.xLine and DATA.yLine are for plotting smooth
% curves (usually passed to plot with '-') and DATA.xPoints and D... |
github | foucart/Basc-master | conv.m | .m | Basc-master/basc_v1.0/chebfun-master/@bndfun/conv.m | 12,602 | utf_8 | cbb19cc6f9d46738901fe5029ef85f14 | function h = conv(f, g)
%CONV Convolution of BNDFUN objects.
% H = CONV(F, G) produces the convolution of BNDFUN objects F and G:
% -
% /
% H(x) = | F(t) G(x-t) dt, x in [a + c, b + d]
% /
% -
% where domain(F) is [a, b] ... |
github | foucart/Basc-master | solvebvpNonlinear.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebop/solvebvpNonlinear.m | 11,535 | utf_8 | 4b3aa5d64d01bbe7a511c8c3080da38d | function [u, info] = solvebvpNonlinear(N, rhs, L, u0, res, pref, displayInfo)
%SOLVEBVPNONLINEAR Solve a nonlinear BVP, using damped Newton iteration.
% The inputs to the method are:
% N: Nonlinear CHEBOP
% rhs: A CHEBMATRIX, right hand side of ODE
% L: A LINOP, linearisation of N around the ini... |
github | foucart/Basc-master | linearize.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebop/linearize.m | 10,337 | utf_8 | 15e978b25e66cff5e18cd2fbccd1249a | function [L, res, isLinear, u] = linearize(N, u, x, flag)
%LINEARIZE Linearize a CHEBOP.
% L = LINEARIZE(N) returns a LINOP that corresponds to linearising the CHEBOP
% N around the zero function on N.DOMAIN. The linop L will both include the
% linearised differential equation, as well as linearised boundary co... |
github | foucart/Basc-master | solvebvp.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebop/solvebvp.m | 8,005 | utf_8 | a2f1261e500a5fc643b116ec099eac67 | function [u, info] = solvebvp(N, rhs, varargin)
%SOLVEBVP Solve a linear or nonlinear CHEBOP BVP system.
%
% U = SOLVEBVP(N, RHS), where N is a CHEBOP and RHS is a CHEBMATRIX, CHEBFUN
% or a vector of doubles attempts to solve the BVP
%
% N(U) = RHS + boundary conditions specified by N
%
% Observe that U =... |
github | foucart/Basc-master | disp.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebop/disp.m | 4,310 | utf_8 | 1e806eeb138bde8482a56acfcfce496c | function disp(A)
%DISP Display a CHEBOP by converting it to a pretty-printed string.
%
% See also DISPLAY.
% Copyright 2014 by The University of Oxford and The Chebfun Developers.
% See http://www.chebfun.org/ for Chebfun information.
loose = strcmp(get(0, 'FormatSpacing'), 'loose');
if ( isempty(A) )
fprintf(... |
github | foucart/Basc-master | feval.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebop/feval.m | 9,053 | utf_8 | c80e7844e6f70f368951c005ae3a3037 | function out = feval(N, varargin)
%FEVAL Evaluate the operator of the CHEBOP at a CHEBFUN or CHEBMATRIX.
% OUT = FEVAL(N, U) for a CHEBFUN or CHEBMATRIX U applies the CHEBOP N to U,
% i.e., it returns N(U). Here, N.OP should be of the form @(u) diff(u,2) + ...
% If N.op is of the form @(x, u) diff(u,2) + ... th... |
github | foucart/Basc-master | refine.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebtech2/refine.m | 4,564 | utf_8 | 97e59b191548c5945482b0a13f2b2de1 | function [values, giveUp] = refine(op, values, pref)
%REFINE Refinement method for CHEBTECH2 construction.
% VALUES = REFINE(OP, VALUES, PREF) determines the new VALUES of the operator
% OP to be checked for happiness in the CHEBTECH2 construction process. The
% exact procedure used is determined by PREF.REFINE... |
github | foucart/Basc-master | compose.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebtech2/compose.m | 7,127 | utf_8 | 7c60f23d251196826e120106838ff389 | function f = compose(f, op, g, data, pref)
%COMPOSE Composition of CHEBTECH2 objects.
% COMPOSE(F, OP) returns a CHEBTECH2 representing OP(F), where F is also a
% CHEBTECH2 object, and OP is a function handle.
%
% COMPOSE(F, OP, G) returns a CHEBTECH2 representing OP(F, G), where F and G
% are CHEBTECH object... |
github | foucart/Basc-master | chebtech2.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebtech2/chebtech2.m | 7,814 | utf_8 | 14cd90d4a303583d7c91d4bd5cf52a82 | classdef chebtech2 < chebtech
%CHEBTECH2 Approximate smooth functions on [-1,1] with Chebyshev interpolants.
%
% Class for approximating smooth functions on the interval [-1,1] using
% function values at 2nd-kind Chebyshev points and coefficients of the
% corresponding 1st-kind Chebyshev series expansion.
%
% C... |
github | foucart/Basc-master | test_bary.m | .m | Basc-master/basc_v1.0/chebfun-master/tests/misc/test_bary.m | 2,458 | utf_8 | ff2c522217f0762e1a6a235cbd2bfc60 | % Test for bary.m.
function pass = test_bary(pref)
if ( nargin < 1 )
pref = chebfunpref();
end
% Generate a few random points in [-1 1] to use as test values.
seedRNG(7681);
xr = 2 * rand(1000, 1) - 1;
xr_row = xr.';
xr_mtx = reshape(xr, [100 10]);
xr_3mtx = reshape(xr, [10 10 10]);
% Set an error tolerance.
t... |
github | foucart/Basc-master | test_padeapprox.m | .m | Basc-master/basc_v1.0/chebfun-master/tests/misc/test_padeapprox.m | 267 | utf_8 | 9304ef06dfd7361305a2ea480b755d55 | % Test for padeapprox.m.
function pass = test_padeapprox(pref)
f = @(x) (x.^4 - 3)./((x + 3.2).*(x - 2.2));
[r, a, b, mu, nu, poles, residues] = padeapprox(f, 10, 10);
pass(1) = (mu == 4) && (nu == 2) && ...
(max(abs(sort(poles) - [-3.2 ; 2.2])) < 1e-10);
end
|
github | foucart/Basc-master | test_ultrapoly.m | .m | Basc-master/basc_v1.0/chebfun-master/tests/misc/test_ultrapoly.m | 844 | utf_8 | 6da6b6f8a4767f3c316fb133f9bb268b | % Test file for ULTRAPOLY
function pass = test_ultrapoly(pref)
if ( nargin == 0 )
pref = chebfunpref();
end
tol = 1e-14;
lambda = 2.1;
U = ultrapoly(10, lambda);
r = roots( U );
exact = jacpts( 10, lambda-.5, lambda -.5);
pass(1) = norm( sort(r) - sort(exact) ) < tol ;
lambda = 1.9;
U = ultrapoly(11, lambd... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.