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
test_innerProduct.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/singfun/test_innerProduct.m
3,518
utf_8
1b17322a3a6c2d22cf10f6acbc628ce1
% Test file for singfun/innerProduct.m function pass = test_innerProduct(pref) % Get preferences. if ( nargin < 1 ) pref = chebfunpref(); end % The order of the exponents: a = 0.64; b = -0.64; c = 1.28; d = -1.28; p = -0.2; q = -0.3; % fractional pole at the left endpoint data.exponents = [p 0]; data.singType =...
github
foucart/Basc-master
test_singfun_constructor.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/singfun/test_singfun_constructor.m
3,077
utf_8
fe76f65aa0f84921dfe6a00442f6d574
% Test file for singfun constructor. function pass = test_singfun_constructor(pref) % Get preferences: if ( nargin < 1 ) pref = chebfunpref(); end %% % Select some random points as sample points % These random points are in [-1, 1] seedRNG(7890) x = -1 + 2*rand(1, 100); x = sort(x); % Some arbit...
github
foucart/Basc-master
test_plus.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/singfun/test_plus.m
2,792
utf_8
af100caf840b697a385b26086331eb07
% Test file for singfun/plus.m % This has been adapted from bndfun test for plus. function pass = test_plus(pref) % Get preferences. if ( nargin < 1 ) pref = chebfunpref(); end % Generate a few random points to use as test values. seedRNG(666); x = 2 * rand(100, 1) - 1; % A random number to use as an arbitrary a...
github
foucart/Basc-master
test_isempty.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/singfun/test_isempty.m
350
utf_8
59b25e665ecb6c080c852aa814a78a19
% Test file for singfun/isempty.m function pass = test_isempty(pref) % No preferences used. % create an empty SINGFUN f = singfun; % create a zero SINGFUN g = singfun.zeroSingFun(); % create a non-zero SINGFUN data.exponents = [-1, 0]; h = singfun(@(x)1./(1+x), data); % Test pass(1) = isempty(f); pass(2) = ~isemp...
github
foucart/Basc-master
test_isequal.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/singfun/test_isequal.m
1,148
utf_8
6c723b248d87cf72b944c956734c22f1
% Test file for singfun/isequal.m function pass = test_isequal(pref) % Get preferences if not given if ( nargin < 1 ) pref = chebfunpref(); end %% % declare pass vector %% % create an empty SINGFUN f = singfun(); g = singfun(); % following Matlab conventions, two empty objects are equal pass(1) = isequal(f,g); ...
github
foucart/Basc-master
test_rdivide.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/singfun/test_rdivide.m
4,113
utf_8
5340fc6525ff99f6372bc7ec799bbdf2
% Test file for singfun/rdivide.m function pass = test_rdivide(pref) % Get preferences. if ( nargin < 1 ) pref = chebfunpref(); end % Generate a few random points to use as test values. seedRNG(666); x = 2 * rand(100, 1) - 1; x = sort(x); %% % Check operation in the case of empty arguments. f = singfun(); data....
github
foucart/Basc-master
test_roots.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/singfun/test_roots.m
2,089
utf_8
5883f40c0490c67a5070424b01410835
% Test file for singfun/roots.m function pass = test_roots(pref) % Get preferences. if ( nargin < 1 ) pref = chebfunpref(); end % The order of the exponents: a = 0.56; b = -0.56; c = 1.28; d = -1.28; % fractional root at the left endpoint and the smooth part has no roots in % [-1 1]. data.exponents = [a 0]; da...
github
foucart/Basc-master
test_imag.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/singfun/test_imag.m
792
utf_8
3662a21ca201f70cff6ed86848e3eab9
% Test file for singfun/imag.m function pass = test_imag(pref) % Get preferences. if ( nargin < 1 ) pref = chebfunpref(); end % Check for empty cases: f = singfun(); pass(1) = isempty(imag(f)); % A real smooth SINGFUN should not return a SINGFUN f = singfun(@(x) sin(x)); pass(2) = ~isa(imag(f), 'singfun'); % I...
github
foucart/Basc-master
test_real.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/singfun/test_real.m
727
utf_8
35f4b9349a46ffb69e2fbc295980147e
% Test file for singfun/real.m function pass = test_real(pref) % Get preferences. if ( nargin < 1 ) pref = chebfunpref(); end % Check for empty cases: f = singfun(); pass(1) = isempty(real(f)); % A purely imaginary smooth SINGFUN should not return a SINGFUN f = singfun(@(x) 1i*sin(x)); pass(2) = ~isa(real(f), '...
github
foucart/Basc-master
test_diff.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/singfun/test_diff.m
3,822
utf_8
cb01a034aa888be8301e84b5b89d3de8
% Test file for singfun/diff.m function pass = test_diff(pref) % Get preferences. if ( nargin < 1 ) pref = chebfunpref(); end % Generate a few random points to use as test values. seedRNG(6178); d = 2; x = 2*(1-10^(-d)) * rand(100, 1) - (1-10^(-d)); % The order of the exponents: a = 0.56; b = -0.56; c = 1.28; d...
github
foucart/Basc-master
test_cumsum.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/singfun/test_cumsum.m
3,276
utf_8
42123c2e8cb22d9896da954fe3c84f74
% Test file for singfun/cumsum.m function pass = test_cumsum(pref) % Get preferences. if ( nargin < 1 ) pref = chebfunpref(); end % Generate a few random points to use as test values. seedRNG(6178); D = 2; x = 2*(1-10^(-D)) * rand(100, 1) - (1-10^(-D)); % The order of the exponents: a = 0.64; b = -0.64; c = 1.2...
github
foucart/Basc-master
test_sum.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/singfun/test_sum.m
2,014
utf_8
32176c6c692a3263b53b903b2182e7a9
% Test file for singfun/sum.m function pass = test_sum(pref) % Get preferences. if ( nargin < 1 ) pref = chebfunpref(); end % The order of the exponents: a = 0.64; b = -0.64; c = 1.28; d = -1.28; % fractional root at the left endpoint data.exponents = [a 0]; data.singType = {'root', 'none'}; f = singfun(@(x) (1...
github
foucart/Basc-master
test_isnan.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/singfun/test_isnan.m
754
utf_8
7bbac3831fb92e2bff497cc25515546a
% Test file for singfun/isnan.m function pass = test_isnan(pref) % Get preferences. if ( nargin < 1 ) pref = chebfunpref(); end % The order of the exponents: a = 0.64; b = -0.64; c = 1.28; d = -1.28; %% % Check a few cases. % fractional root at the left endpoint data.exponents = [a 0]; data.singType = {'root',...
github
foucart/Basc-master
test_conj.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/singfun/test_conj.m
721
utf_8
b6405a38684750d9e519a7767b86ea35
% Test file for singfun/conj.m function pass = test_conj(pref) % Get preferences. if ( nargin < 1 ) pref = chebfunpref(); end %% % Empty f = singfun(); pass(1) = isempty(conj(f)); % A smooth SINGFUN conjugated should not return a SINGFUN f = singfun(@(x) sin(x)); pass(2) = ~isa(conj(f), 'singfun'); % Real smoo...
github
foucart/Basc-master
test_compose.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/singfun/test_compose.m
1,250
utf_8
f0b8ab3671a38f628bc632c708301d67
% Test file for sing/compose.m function pass = test_compose(pref) if ( nargin < 1 ) pref = chebfunpref(); end % Generate a few random points to use as test values. seedRNG(6178); d = 2; x = 2*(1-10^(-d)) * rand(100, 1) - (1-10^(-d)); % Composition of two SINGFUNs - OP(F, G): data.exponents = [-1 0]; f = singfun...
github
foucart/Basc-master
test_times.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/singfun/test_times.m
4,321
utf_8
acf9fe22759bb3e425b527c92f145d50
% Test file for singfun/times.m function pass = test_times(pref) % Get preferences. if ( nargin < 1 ) pref = chebfunpref(); end % Generate a few random points to use as test values. seedRNG(6178); d = 14; x = 2*(1-10^(-d)) * rand(500, 1) - (1-10^(-d)); % The order of the exponents: a = 0.64; b = -0.64; c = 1.28...
github
foucart/Basc-master
test_restrict.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/singfun/test_restrict.m
3,650
utf_8
4d3d083b650b9bdc15994b82f3247ec7
% Test file for singfun/restrict.m function pass = test_restrict(pref) % Get preferences. if ( nargin < 1 ) pref = chebfunpref(); end % The order of the exponents: a = 0.64; b = -0.64; c = 1.28; d = -1.28; % Fractional root at the left endpoint and the smooth part has no roots in % [-1 1]. We restrict f to a s...
github
foucart/Basc-master
test_isfinite.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/singfun/test_isfinite.m
586
utf_8
2e108871211068c0d27425eddbaff633
% Test file for singfun/isfinite.m function pass = test_isfinite(pref) % Get preferences. if ( nargin < 1 ) pref = chebfunpref(); end % The order of the exponents: a = 0.64; b = -0.64; c = 1.28; d = -1.28; %% % Check a few cases. % fractional root at the left endpoint data.exponents = [a 0]; data.singType = {'...
github
foucart/Basc-master
test_flipud.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/singfun/test_flipud.m
3,036
utf_8
fbf564b369d8f7502e72ef04bd185587
% Test file for singfun/flipud.m function pass = test_flipud(pref) % Get preferences. if ( nargin < 1 ) pref = chebfunpref(); end % Generate a few random points to use as test values. seedRNG(6178); d = 10; x = 2*(1-10^(-d)) * rand(100, 1) - (1-10^(-d)); % The order of the exponents: a = 0.64; b = -0.64; c = 1....
github
foucart/Basc-master
test_assignColumns.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/chebtech/test_assignColumns.m
767
utf_8
2eb28707d31d421923b08a0fafbc63d2
% Test file for @chebtech/assignColumns.m. function pass = test_assignColumns(pref) if ( nargin < 1 ) pref = chebtech.techPref(); end % Generate a few random points to use as test values. seedRNG(6178); x = 2 * rand(100, 1) - 1; for (n = 1:2) if (n == 1) testclass = chebtech1(); else tes...
github
foucart/Basc-master
test_minandmax.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/chebtech/test_minandmax.m
2,536
utf_8
0d95674fe57487335cfac5252f4415c7
% Test file for chebtech/minandmax.m function pass = test_minandmax(pref) % Get preferences. if ( nargin < 1 ) pref = chebtech.techPref(); end for n = 1:2 if ( n == 1 ) testclass = chebtech1(); else testclass = chebtech2(); end %% % Spot-check the extrema for a few functions...
github
foucart/Basc-master
test_minus.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/chebtech/test_minus.m
4,060
utf_8
7b24ebe2c73121aecea2a8023826043d
% Test file for chebtech/minus.m function pass = test_minus(pref) % Get preferences. if ( nargin < 1 ) pref = chebtech.techPref(); end % Generate a few random points to use as test values. seedRNG(6178); x = 2 * rand(100, 1) - 1; % A random number to use as an arbitrary additive constant. alpha = randn() + 1i*r...
github
foucart/Basc-master
test_feval.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/chebtech/test_feval.m
2,614
utf_8
cead481b20886ffe5188566acdd44e75
% Test file for chebtech/feval.m function pass = test_feval(pref) % Get preferences. if ( nargin < 1 ) pref = chebtech.techPref(); end % Generate a few random points to use as test values. seedRNG(7681); x = 2 * rand(1000, 1) - 1; for n = 1:2 if ( n == 1 ) testclass = chebtech1(); else ...
github
foucart/Basc-master
test_bary.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/chebtech/test_bary.m
631
utf_8
e4036e8e22be8d78843c8c390869e7da
% Test file for chebtech/bary.m function pass = test_bary(pref) % TODO: Beef up this test, as bary() is no longer tested by test_feval(). if ( nargin < 1 ) pref = chebtech.techPref(); end tol = 20*pref.eps; for n = 1:2 if ( n == 1 ) testclass = chebtech1(); else testclass = chebtech2()...
github
foucart/Basc-master
test_max.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/chebtech/test_max.m
2,149
utf_8
32c09b319abc15e0a56c85c4ad2d39c7
% Test file for chebtech/max.m function pass = test_max(pref) % Get preferences. if ( nargin < 1 ) pref = chebtech.techPref(); end for n = 1:2 if ( n == 1 ) testclass = chebtech1(); else testclass = chebtech2(); end %% % Spot-check the extrema for a few functions. pass(n,...
github
foucart/Basc-master
test_simplify.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/chebtech/test_simplify.m
2,033
utf_8
f740e000662565566b32deaec88c05c9
% Test file for chebtech/simplify.m function pass = test_simplify(pref) % Get preferences: if ( nargin < 1 ) pref = chebtech.techPref(); end % Generate a few random points to use as test values. seedRNG(6178); x = 2 * rand(100, 1) - 1; % Tolerance for passing to simplify: simptol = 1e-6; for n = 1:2 if ( n...
github
foucart/Basc-master
test_happinessCheck.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/chebtech/test_happinessCheck.m
3,241
utf_8
f904de34bc9bba553885fb72da8fb133
% Test file for chebtech/happinessCheck.m function pass = test_happinessCheck(pref) % Get preferences: if ( nargin < 1 ) pref = chebtech.techPref(); end inputPref = pref; for n = 1:2 if ( n == 1 ) testclass = chebtech1(); else testclass = chebtech2(); end pref = inputPref; ...
github
foucart/Basc-master
test_clenshaw.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/chebtech/test_clenshaw.m
977
utf_8
37b44d254c35ceea158993158d66e2ec
% Test file for chebtech/clenshaw.m function pass = test_clenshaw(varargin) % Set a tolerance (pref.eps doesn't matter) tol = 10*eps; %% % Test that a single coefficient is evaluated correctly: % For a scalar evaluation: c = sqrt(2); v = chebtech.clenshaw(0, c); pass(1) = c == v; % For a vector evaluation: x = [-.5...
github
foucart/Basc-master
test_fourcoeffs.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/chebtech/test_fourcoeffs.m
2,320
utf_8
a34c719fabcd17f8b825f9a5e9e88638
% Test file for chebtech/fourcoeffs.m function pass = test_fourcoeffs(pref) % Get preferences. if ( nargin < 1 ) pref = chebtech.techPref(); end for n = 1:2 if ( n == 1 ) testclass = chebtech1(); else testclass = chebtech2(); end %% % Check a few simple examples. f ...
github
foucart/Basc-master
test_isinf.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/chebtech/test_isinf.m
795
utf_8
1eab5ecfb35a21d3e6c6424be157bbec
% Test file for chebtech/isinf.m function pass = test_isinf(pref) if ( nargin < 1 ) pref = chebtech.techPref(); end p = pref; for n = 1:2 if ( n == 1 ) testclass = chebtech1(); else testclass = chebtech2(); end % Test a scalar-valued function: y = ones(11,1); y(4) = inf...
github
foucart/Basc-master
test_iszero.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/chebtech/test_iszero.m
788
utf_8
4852a60dca31c08f8c3e5e932cebf080
% Test file for chebtech/iszero.m function pass = test_iszero(pref) if ( nargin == 0 ) pref = chebtech.techPref(); end for n = 1:2 if ( n == 1) testclass = chebtech1(); else testclass = chebtech2(); end f = testclass.make(0, [], pref); f.coeffs = [0 1 0 ; 0 0 NaN]; % isz...
github
foucart/Basc-master
test_innerProduct.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/chebtech/test_innerProduct.m
3,233
utf_8
73fd261d64a412a898d60394ac4226ea
% Test file for chebtech/innerProduct.m function pass = test_innerProduct(pref) % Get preferences. if ( nargin < 1 ) pref = chebtech.techPref(); end % Fixed arbitrary numbers to use as multiplicative constants. alpha = -0.194758928283640 + 0.075474485412665i; beta = -0.526634844879922 - 0.685484380523668i; for ...
github
foucart/Basc-master
test_min.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/chebtech/test_min.m
2,202
utf_8
b78d7ef751795d4c071b08fcdcf6d020
% Test file for chebtech/min.m function pass = test_min(pref) % Get preferences. if ( nargin < 1 ) pref = chebtech.techPref(); end for n = 1:2 if ( n == 1 ) testclass = chebtech1(); else testclass = chebtech2(); end %% % Spot-check the extrema for a few functions. p...
github
foucart/Basc-master
test_mtimes.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/chebtech/test_mtimes.m
2,904
utf_8
6790e6c03902469717fe11c46e422198
% Test file for chebtech/mtimes.m function pass = test_mtimes(pref) % Get preferences. if ( nargin < 1 ) pref = chebtech.techPref(); end % Generate a few random points to use as test values. seedRNG(6178); x = 2 * rand(100, 1) - 1; % A random number to use as an arbitrary scalar multiplier. alpha = randn() + 1i...
github
foucart/Basc-master
test_plus.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/chebtech/test_plus.m
4,671
utf_8
abd46df18f78800f14e0ce1a8cc6584a
% Test file for chebtech/plus.m function pass = test_plus(pref) % Get preferences. if ( nargin < 1 ) pref = chebtech.techPref(); end % Generate a few random points to use as test values. seedRNG(6178); x = 2 * rand(100, 1) - 1; % A random number to use as an arbitrary additive constant. alpha = -0.1947589282836...
github
foucart/Basc-master
test_isempty.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/chebtech/test_isempty.m
570
utf_8
b8efec3131606a98efade2a9ebed1cb3
% Test file for chebtech/isempty.m function pass = test_isempty(varargin) for n = 1:2 if ( n == 1 ) testclass = chebtech1(); else testclass = chebtech2(); end f = testclass.make(); pass(n, 1) = isempty(f); f = testclass.make(@sin); pass(n, 2) = ~isempty(f); ...
github
foucart/Basc-master
test_fliplr.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/chebtech/test_fliplr.m
572
utf_8
8b8ea7f2d2dbcad7808ba3b25dc1f0aa
% Test file for chebtech/fliplr.m function pass = test_fliplr(pref) % Get preferences. if ( nargin < 1 ) pref = chebtech.techPref(); end for n = 1:2 if ( n == 1 ) testclass = chebtech1(); else testclass = chebtech2(); end %% % Conduct a few very straightforward tests. ...
github
foucart/Basc-master
test_length.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/chebtech/test_length.m
611
utf_8
af6641c677b28d1f38e9fc1eb1a7285d
% Test file for chebtech/length.m function pass = test_length(pref) if ( nargin < 1 ) pref = chebtech.techPref(); end for n = 1:2 if ( n == 1 ) testclass = chebtech1(); else testclass = chebtech2(); end f = testclass.make(@(x) sin(x), [], pref); pass(n, 1) = length(f) == siz...
github
foucart/Basc-master
test_isequal.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/chebtech/test_isequal.m
754
utf_8
96d731eca446412cec89afaf8e7cfad3
% Test file for chebtech/isequal.m function pass = test_isequal(pref) % Get preferences. if ( nargin < 1 ) pref = chebtech.techPref(); end for n = 1:2 if ( n == 1 ) testclass = chebtech1(); else testclass = chebtech2(); end %% % Run a few very straightforward tests. ...
github
foucart/Basc-master
test_rdivide.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/chebtech/test_rdivide.m
4,467
utf_8
ae7aa8eca6f670e47b97e92b5cef0067
% Test file for chebtech/rdivide.m function pass = test_rdivide(pref) % Get preferences. if ( nargin < 1 ) pref = chebtech.techPref(); end % Generate a few random points to use as test values. seedRNG(6178); x = 2 * rand(100, 1) - 1; % Random numbers to use as arbitrary constants. alpha = -0.194758928283640 + 0...
github
foucart/Basc-master
test_roots.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/chebtech/test_roots.m
3,447
utf_8
35f51d7bfbeb8999ca78829bc9c4da4d
% Test file for chebtech/roots.m function pass = test_roots(pref) if ( nargin < 1 ) pref = chebtech.techPref(); end for n = 1:2 if ( n == 1 ) testclass = chebtech1(); else testclass = chebtech2(); end %% Test roots of a bessel function: map = @(x) (x+1)*50; f = testclass...
github
foucart/Basc-master
test_imag.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/chebtech/test_imag.m
1,156
utf_8
435e4d114e1bfc74df283dd7df3f3896
% Test file for chebtech/imag.m function pass = test_imag(pref) if ( nargin < 1 ) pref = chebtech.techPref(); end for n = 1:2 if ( n == 1 ) testclass = chebtech1(); else testclass = chebtech2(); end % Test a scalar-valued function: f = testclass.make(@(x) exp(x) + 1i*sin(x),...
github
foucart/Basc-master
test_isreal.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/chebtech/test_isreal.m
862
utf_8
396ea07e79b940aa23e4d82e70428e39
% Test file for chebtech/isreal.m function pass = test_isreal(pref) if ( nargin < 1 ) pref = chebtech.techPref(); end for n = 1:2 if ( n == 1 ) testclass = chebtech1(); else testclass = chebtech2(); end % Test a scalar-valued function: f = testclass.make(@(x) sin(x) + 1i*cos...
github
foucart/Basc-master
test_cell2mat.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/chebtech/test_cell2mat.m
516
utf_8
ce816b9c58dfe1280c2231fed4c97577
% Test file for chebtech/cell2mat.m function pass = test_cell2mat(pref) if ( nargin < 2 ) pref = chebtech.techPref(); end for n = 1:2 if (n == 1); testclass = chebtech1(); else testclass = chebtech2(); end f = testclass.make(@(x) [sin(x) cos(x) exp(x)], [], pref); g = te...
github
foucart/Basc-master
test_mrdivide.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/chebtech/test_mrdivide.m
2,545
utf_8
c1be06e0ca9ea7234f9d43aeea4a35a1
% Test file for chebtech/mrdivide.m function pass = test_mrdivide(pref) % Get preferences. if (nargin < 1) pref = chebtech.techPref(); end % Generate a few random points to use as test values. seedRNG(6178); x = 2 * rand(100, 1) - 1; % Random number to use as a scalar constant. alpha = -0.194758928283640 + 0.07...
github
foucart/Basc-master
test_real.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/chebtech/test_real.m
1,119
utf_8
ada0ba50797f0dd30d4d7c73af470102
% Test file for chebtech/real.m function pass = test_real(pref) if ( nargin < 1 ) pref = chebtech.techPref(); end for n = 1:2 if ( n == 1 ) testclass = chebtech1(); else testclass = chebtech2(); end % Test a scalar-valued function: f = testclass.make(@(x) exp(1i*x) + 1i*sin(...
github
foucart/Basc-master
test_diff.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/chebtech/test_diff.m
4,213
utf_8
165ae7232f696fefbd41176e89a0be30
% Test file for chebtech/diff.m function pass = test_diff(pref) % Get preferences. if ( nargin < 1 ) pref = chebtech.techPref(); end % Generate a few random points to use as test values. seedRNG(6178); x = 2 * rand(100, 1) - 1; for n = 1:2 if ( n == 1 ) testclass = chebtech1(); else tes...
github
foucart/Basc-master
test_prolong.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/chebtech/test_prolong.m
3,586
utf_8
f8cf7d72d03458891bdd43bd578c59dd
% Test file for chebtech/prolong.m function pass = test_prolong(pref) if ( nargin < 1 ) pref = chebtech.techPref(); end for n = 1:2 if ( n == 1 ) testclass = chebtech1(); else testclass = chebtech2(); end F = @sin; f = testclass.make(@(x) F(x), [], pref); k = 11; g ...
github
foucart/Basc-master
test_mat2cell.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/chebtech/test_mat2cell.m
583
utf_8
9aa1a7ac1d0653d109e13cac559dd244
% Test file for chebtech/mat2cell.m function pass = test_mat2cell(pref) if ( nargin < 2 ) pref = chebtech.techPref(); end for n = 1:2 if ( n == 1 ) testclass = chebtech1(); else testclass = chebtech2(); end f = testclass.make(@(x) [sin(x) cos(x) exp(x)], [], pref); g = testc...
github
foucart/Basc-master
test_size.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/chebtech/test_size.m
615
utf_8
034a68ad3abcb2c5b66aa8100a1c4b8e
% Test file for chebtech/size.m function pass = test_size(pref) if ( nargin < 1 ) pref = chebtech.techPref(); end for n = 1:2 if ( n == 1 ) testclass = chebtech1(); else testclass = chebtech2(); end f = testclass.make(@(x) sin(x), [], pref); pass(n, 1) = all(size(f) == size(...
github
foucart/Basc-master
test_cumsum.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/chebtech/test_cumsum.m
2,967
utf_8
638956f0be296228d324d8c01e1a6ca5
% Test file for chebtech/cumsum.m % [TODO]: Fix test tolerances once we've figured out how to properly update % epslevels in chebtech.cumsum(). function pass = test_cumsum(pref) % Get preferences. if ( nargin < 1 ) pref = chebtech.techPref(); end % Generate a few random points to use as test values. seedRNG(61...
github
foucart/Basc-master
test_mldivide.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/chebtech/test_mldivide.m
1,655
utf_8
da211f27fa805a0063421950e5fba71f
% Test file for chebtech/mldivide.m function pass = test_mldivide(pref) % Get preferences. if (nargin < 1) pref = chebtech.techPref(); end for n = 1:2 if ( n == 1 ) testclass = chebtech1(); else testclass = chebtech2(); end %% % Basic correctness checks. % We get a know...
github
foucart/Basc-master
test_sum.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/chebtech/test_sum.m
2,658
utf_8
912b8e7534d2c8a440bccba803d9b19e
% Test file for chebtech/sum.m function pass = test_sum(pref) % Get preferences. if ( nargin < 1 ) pref = chebtech.techPref(); end for n = 1:2 if ( n == 1 ) testclass = chebtech1(); else testclass = chebtech2(); end %% % Spot-check integrals for a couple of functions. f ...
github
foucart/Basc-master
test_isnan.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/chebtech/test_isnan.m
1,267
utf_8
2af068a613b7481137bcaba5a6243699
% Test file for chebtech/isnan.m function pass = test_isnan(pref) if ( nargin < 1 ) pref = chebtech.techPref(); end p = pref; for n = 1:2 if ( n == 1 ) testclass = chebtech1(); else testclass = chebtech2(); end % Test a scalar-valued function: f = testclass.make(@(x) x, [], ...
github
foucart/Basc-master
test_conj.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/chebtech/test_conj.m
788
utf_8
f5e45d7f9f407980337959b8df954473
% Test file for chebtech/conj.m function pass = test_conj(pref) if ( nargin < 1 ) pref = chebtech.techPref(); end for n = 1:2 if (n == 1) testclass = chebtech1(); else testclass = chebtech2(); end % Test a scalar-valued function: f = testclass.make(@(x) cos(x) + 1i*sin(x), [...
github
foucart/Basc-master
test_compose.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/chebtech/test_compose.m
4,391
utf_8
84d705a6ff4ed7fd59bdc481ec2cf172
% Test file for chebtech/compose.m function pass = test_compose(pref) if ( nargin < 1 ) pref = chebtech.techPref(); end for n = 1:4 if ( n == 1 ) testclass = chebtech1(); else testclass = chebtech2(); if ( n == 3 ) pref.refinementFunction = 'resampling'; end ...
github
foucart/Basc-master
test_times.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/chebtech/test_times.m
5,984
utf_8
0feb8c20dee5407fc4279e1d2b4779cd
% Test file for chebtech/times.m function pass = test_times(pref) % Get preferences. if (nargin < 1) pref = chebtech.techPref(); end % Generate a few random points to use as test values. seedRNG(6178); x = 2 * rand(100, 1) - 1; % Random numbers to use as arbitrary multiplicative constants. alpha = -0.1947589282...
github
foucart/Basc-master
test_any.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/chebtech/test_any.m
621
utf_8
b599d30c583390c12dcc5473b2618c48
% Test file for @chebtech/any.m. function pass = test_any(pref) if ( nargin < 1 ) pref = chebtech.techPref(); end for n = 1:2 if ( n == 1 ) testclass = chebtech1(); else testclass = chebtech2(); end % Check behavior for any() down columns. pass(n, 1) = ~any(testclass()); ...
github
foucart/Basc-master
test_restrict.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/chebtech/test_restrict.m
3,193
utf_8
279d9cb54527f47bdb894953a49e9ff2
% Test file for chebtech/restrict.m function pass = test_restrict(pref) % Get preferences. if (nargin < 1) pref = chebtech.techPref(); end for n = 1:2 if ( n == 1 ) testclass = chebtech1(); else testclass = chebtech2(); end %% % Check behavior for empty inputs. f = testcl...
github
foucart/Basc-master
test_isfinite.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/chebtech/test_isfinite.m
816
utf_8
b967171110e96267bdc98d0a0818dcbc
% Test file for chebtech/isfinite.m function pass = test_isfinite(pref) if ( nargin < 1 ) pref = chebtech.techPref(); end p = pref; for n = 1:2 if ( n == 1 ) testclass = chebtech1(); else testclass = chebtech2(); end % Test a scalar-valued function: y = ones(11, 1); y(4...
github
foucart/Basc-master
test_qr.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/chebtech/test_qr.m
3,228
utf_8
3ec9ae54af94bcdcff1ab09952820178
% Test file for chebtech/qr.m function pass = test_qr(pref) % Get preferences. if ( nargin < 1 ) pref = chebtech.techPref(); end % Generate a few random points to use as test values. seedRNG(6178); x = 2 * rand(100, 1) - 1; for n = 1:4 switch ( n ) case 1 testclass = chebtech1(); ...
github
foucart/Basc-master
test_poly.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/chebtech/test_poly.m
1,290
utf_8
e8e7e80a81923333be316c83550ee2c6
% Test file for chebtech/poly.m function pass = test_poly(pref) % Get preferences. if ( nargin < 1 ) pref = chebtech.techPref(); end for n = 1:2 if ( n == 1 ) testclass = chebtech1(); else testclass = chebtech2(); end %% % Check a few simple examples. f = testclass....
github
foucart/Basc-master
test_flipud.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/chebtech/test_flipud.m
1,153
utf_8
2c6d47ce1642bb7be5dc259a201cce62
% Test file for chebtech/flipud.m function pass = test_flipud(pref) if ( nargin < 1 ) pref = chebtech.techPref(); end for n = 1:2 if ( n == 1 ) testclass = chebtech1(); else testclass = chebtech2(); end % Try some standard calls to flipud f = testclass.make(@(x) sin(x+....
github
foucart/Basc-master
test_scaleInvariance.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/chebtech/test_scaleInvariance.m
1,353
utf_8
4ea0dba066b922ac9aff3315ccad6618
% Test vertical scale invariance of chebtech construction. function pass = test_scaleInvariance(pref) if ( nargin == 0 ) pref = chebtech.techPref(); end % Initialise pass matrix: for n = 1:2 % Test for both chebtech1 and chetech2 if ( n == 1 ) testclass = chebtech1(); else testc...
github
foucart/Basc-master
test_legcoeffs.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/chebtech/test_legcoeffs.m
671
utf_8
7d0749a8743a7cc09b789eccd34fd500
% Test file for chebtech/legcoeffs.m function pass = test_legcoeffs(pref) if ( nargin < 1 ) pref = chebtech.techPref(); end tol = 10*eps; for n = 1:2 if ( n == 1 ) testclass = chebtech1(); else testclass = chebtech2(); end % Test a scalar function (with P_3) x = te...
github
foucart/Basc-master
test_feval2.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/chebop/test_feval2.m
576
utf_8
f99e2599343c9ac513d11a16597ef3f0
function pass = test_feval2(pref) pass = []; if ( nargin == 0 ) pref = chebfunpref(); end %% Check chebop application op = @(x,u) diff(u,2) + x.*u; bc = @(x,u) [ u(-1); u(1) ]; A = chebop(op, [-1,1], bc); [ev, ew] = eigs(A); pass(1) = doesNotCrash(@() A*chebfun(ev)); pass(2) = doesNotCrash(@() A*quasimatrix(ev)...
github
foucart/Basc-master
test_linearSystem2.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/chebop/test_linearSystem2.m
3,059
utf_8
ca45134be2849c072f5f189eafd9bf6f
function pass = test_linearSystem2(pref) % Test solution of a 2x2 system % Toby Driscoll (extended by AB) % Note: This test is taken from chebop_systemsolve1 in V4. %% Setup: if ( nargin == 0 ) pref = cheboppref; end tol = 1e-10; %% Smooth domain: d = [-1 1]; A = chebop(@(x, u) [diff(u{1}) + u{1} + 2*u{2} ; ......
github
foucart/Basc-master
test_alias.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/chebtech1/test_alias.m
1,642
utf_8
7c4d815fa961fd34fafa59e95841c9e4
% Test file for chebtech/alias.m function pass = test_alias(varargin) % Set a tolerance (pref.eps doesn't matter) tol = 2e2*eps; %% % Testing a vector of coefficients. c0 = (1:10)'; % Padding: c1 = chebtech1.alias(c0, 11); pass(1) = norm([0 ; c0] - c1, inf) == 0; % Aliasing: c2 = chebtech1.alias(c0, 9); pass(2) = ...
github
foucart/Basc-master
test_extrapolate.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/chebtech1/test_extrapolate.m
764
utf_8
35f19b394a19981ebb3afef644f96ebe
% Test file for chebtech1/extrapolate.m function pass = test_extrapolate(pref) % Obtain preferences if ( nargin < 1 ) pref = chebtech.techPref(); end % Set a tolerance: tol = 100*pref.eps; % Initialise: s = 0; n = 17; x = chebtech1.chebpts(n); f = chebtech1; for k = 1:2 % Test once for a vector of coe...
github
foucart/Basc-master
test_constructor.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/chebtech1/test_constructor.m
2,090
utf_8
17119412c3b0c802c8d3742cb428a95b
% Test file for chebtech1 constructor. function pass = test_constructor(pref) % Get preferences: if ( nargin < 1 ) pref = chebtech.techPref(); end %% % Test on a scalar-valued function: pref.refinementFunction = 'nested'; f = @(x) sin(x); g = populate(chebtech1, f, [], [], pref); x = chebtech1.chebpts(length(g.c...
github
foucart/Basc-master
test_chebpts.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/chebtech1/test_chebpts.m
1,493
utf_8
0f4302e83cc275d99376bac3487e3904
% Test file for chebtech1/chebpts.m function pass = test_chebpts(varargin) % Set a tolerance (pref.eps doesn't matter) tol = 10*eps; % Test that n = 0 returns empty results: [x, w, v] = chebtech1.chebpts(0); pass(1) = ( isempty(x) && isempty(w) && isempty(v) ); % Test n = 1: [x, w, v] = chebtech1.chebpts(1); pass(2...
github
foucart/Basc-master
test_vals2coeffs.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/chebtech1/test_vals2coeffs.m
1,748
utf_8
f137bc738d2651cd245009302dd0979e
% Test file for chebtech1/vals2coeffs.m function pass = test_vals2coeffs(varargin) % Set a tolerance (pref.eps doesn't matter) tol = 100*eps; %% % Test that a single value is converted correctly v = sqrt(2); c = chebtech1.vals2coeffs(v); pass(1) = (v == c); %% % Simple data (even case) v = (1:6).'; % Exact coeffici...
github
foucart/Basc-master
test_coeffs2vals.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/chebtech1/test_coeffs2vals.m
1,846
utf_8
2a80282880e9faf98ddb7f1f307b5df8
% Test file for chebtech1/coeffs2vals.m function pass = test_coeffs2vals(varargin) % Set a tolerance (pref.eps doesn't matter) tol = 100*eps; %% % Test that a single coefficient is converted correctly c = sqrt(2); v = chebtech1.coeffs2vals(c); pass(1) = (c == v); %% % Simple data (even case) c = (1:6).'; % Exact va...
github
foucart/Basc-master
test_trig3.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/adchebfun/test_trig3.m
334
utf_8
69414a12d7889f7f1480d3ebda18f7d2
% Test file for ADCHEBFUN trigonometric and related functions, part 3/4 function pass = test_trig3 % List of trigonometric functions to test. funcList = {@atand, @atanh, @cos, @cosd, @cosh, @cot, @cotd, @coth, ... @csc, @cscd}; % Call the ADCHEBFUN testUnary() method to do the tests. pass = adchebfun.testUnary(f...
github
foucart/Basc-master
test_expLog.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/adchebfun/test_expLog.m
282
utf_8
9050c79a4f89867b9ea0afe5f4004bac
% Test file for ADCHEBFUN exp, log related functions function pass = test_expLog % List of trigonometric functions to test. funcList = {@exp, @expm1, @log, @log10, @log1p, @log2}; % Call the ADCHEBFUN testUnary() method to do the tests. pass = adchebfun.testUnary(funcList); end
github
foucart/Basc-master
test_trig2.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/adchebfun/test_trig2.m
318
utf_8
e38618e22b3a775855b5c1c3b0b5fe63
% Test file for ADCHEBFUN trigonometric and related functions, part 2/4 function pass = test_trig2 % List of trigonometric functions to test. funcList = {@acsch, @asec, @asecd, @asech, @asin, @asind, @asinh, @atan}; % Call the ADCHEBFUN testUnary() method to do the tests. pass = adchebfun.testUnary(funcList); end
github
foucart/Basc-master
test_lintest_times.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/adchebfun/test_lintest_times.m
1,333
utf_8
cd1f2f3da927ca696ab112309e7f9c58
% TIMES_LINTEST Check that correct linearity information is returned for % various operations with .* function pass = test_lintest_times() %% Initialisation x = chebfun(@(x) x); u = adchebfun(x) + 2; v = adchebfun(x) + 3; %% One variable involved pass = []; w = u*2; pass(length(pass) + 1) = w.linearity == 1; w = u...
github
foucart/Basc-master
test_power.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/adchebfun/test_power.m
884
utf_8
cc68d7a8fbdb2a1c3cb0e02a80a7769b
% Test file for ADCHEBFUN times function pass = test_power % Initialise pass vector pass = zeros(3, 5); % Tolerance for Taylor testing tolOrder = 1e-2; tolDiff = 1e-14; % The function handle we're working with: func = @power; % Compare values [err, lin] = adchebfun.valueTestingBinary(func); % Confirm that the err...
github
foucart/Basc-master
test_pow2Sqrt.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/adchebfun/test_pow2Sqrt.m
246
utf_8
57de6cf14c24481f80201bd82cddab61
% Test file for ADCHEBFUN POW2() and SQRT() function pass = test_pow2Sqrt % List of trigonometric functions to test. funcList = {@pow2, @sqrt}; % Call the ADCHEBFUN testUnary() method to do the tests. pass = adchebfun.testUnary(funcList); end
github
foucart/Basc-master
test_ellipj.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/adchebfun/test_ellipj.m
1,265
utf_8
c84938ae6c5e194662a199c18557b29b
% Test file for ADCHEBFUN ellipj method function pass = test_ellipj % List of airy functions to test, with different inputs ellipj075 = @(f) ellipj(f, 0.75); ellipj1 = @(f) ellipj(f, 1); ellipFunctions = {ellipj075, ellipj1}; % How many iterations we want to in the Taylor testing numSteps = 6; % Tolerance for Tayl...
github
foucart/Basc-master
test_trig1.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/adchebfun/test_trig1.m
318
utf_8
a7b850a7e3c9a1bf34f1a8a2e6b11b9c
% Test file for ADCHEBFUN trigonometric and related functions, part 1/4 function pass = test_trig1 % List of trigonometric functions to test. funcList = {@acos, @acosd, @acosh, @acot, @acotd, @acoth, @acsc, @acscd}; % Call the ADCHEBFUN testUnary() method to do the tests. pass = adchebfun.testUnary(funcList); end
github
foucart/Basc-master
test_innerProduct.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/adchebfun/test_innerProduct.m
1,535
utf_8
f13e8641acdd9c117d1a06a8a26696f6
% Test file for ADCHEBFUN times function pass = test_innerProduct % Initialise pass vector pass = zeros(3, 5); % Tolerance for Taylor testing tolOrder = 1e-2; tolDiff = 1e-14; % The function handle we're working with: func = @innerProduct; % Compare values [err, lin] = adchebfun.valueTestingBinary(func); % Confir...
github
foucart/Basc-master
test_plusMinus.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/adchebfun/test_plusMinus.m
1,306
utf_8
60f196bf5447a843d2888c2faba2e142
% Test file for ADCHEBFUN plus and minus function pass = test_plusMinus % Functions to be tested funcList = {@plus, @minus}; % Initialise pass vector pass = zeros(3*numel(funcList), 5); % Tolerance for Taylor testing tolOrder = 1e-2; tolDiff = 1e-14; % Loop through functions for funcCounter = 1:length(funcList) ...
github
foucart/Basc-master
test_bessel.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/adchebfun/test_bessel.m
340
utf_8
c2534fa64bdf1e1721de37d486cb1ecc
% Test file for ADCHEBFUN Bessel functions function pass = test_bessel % List of airy functions to test, with different number of inputs besselj1 = @(f) besselj(1, f); besselj25 = @(f) besselj(2.5, f); funcList = {besselj1, besselj25}; % Call the ADCHEBFUN testUnary() method to do the tests. pass = adchebfun.testUn...
github
foucart/Basc-master
test_linearityDetection.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/adchebfun/test_linearityDetection.m
1,903
utf_8
9d874b324d66347caab90018eb4789e9
% Test for linearity detection of various complicated expresssions function pass = test_linearityDetection %% Initialise % Seed random generator to ensure same values. seedRNG(6179); % Length of test functions: N = 8; % Generate two arbitrary CHEBFUN objects to evaluate the function at: u1 = chebfun(0.1*rand(N, 1) ...
github
foucart/Basc-master
test_airy.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/adchebfun/test_airy.m
287
utf_8
a75660eb5e423e5d07b44cd6170937bd
% Test file for ADCHEBFUN Airy function function pass = test_airy % List of airy functions to test, with different number of inputs airy2 = @(f) airy(2, f); funcList = {@airy, airy2}; % Call the ADCHEBFUN testUnary() method to do the tests. pass = adchebfun.testUnary(funcList); end
github
foucart/Basc-master
test_rdivide.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/adchebfun/test_rdivide.m
1,614
utf_8
f22ede21c30e9a420828f22c0a313c70
% Test file for ADCHEBFUN times function pass = test_rdivide % Initialise pass vector pass = zeros(2, 5); % Tolerance for Taylor testing tolOrder = 1e-2; tolDiff = 1e-14; % The function handle we're working with: func = @rdivide; % Compare values [err, lin] = adchebfun.valueTestingBinary(func); % Confirm that the...
github
foucart/Basc-master
test_lintest_rdivide.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/adchebfun/test_lintest_rdivide.m
1,336
utf_8
4e32351396a0b04175247b37a9c7fd2c
% RDIVIDE_LINTEST Check that correct linearity information is returned for % various operations with ./ function pass = test_lintest_rdivide() %% Initialisation x = chebfun(@(x) x); u = adchebfun(x) + 2; v = adchebfun(x) + 3; %% One variable involved pass = []; w = u/2; pass(length(pass) + 1) = w.linearity == 1; w...
github
foucart/Basc-master
test_volt.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/adchebfun/test_volt.m
1,111
utf_8
fa465338edcba5400040700b00f3c49f
% Test file for ADCHEBFUN VOLT function pass = test_volt K = @(s, t) exp(-(s-t).^2); % List of trigonometric functions to test. func = @(u) volt(K, u); % Tolerance for Taylor testing tolOrder = 1e-2; tolDiff = 1e-12; % Initialise vector with pass information pass = zeros(1, numel(func)); % Call the valueTesting m...
github
foucart/Basc-master
test_fred.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/adchebfun/test_fred.m
1,111
utf_8
9ff920e866f59fc6a99f4f9264a08216
% Test file for ADCHEBFUN FRED function pass = test_fred K = @(s, t) exp(-(s-t).^2); % List of trigonometric functions to test. func = @(u) fred(K, u); % Tolerance for Taylor testing tolOrder = 1e-2; tolDiff = 1e-12; % Initialise vector with pass information pass = zeros(1, numel(func)); % Call the valueTesting m...
github
foucart/Basc-master
test_cumprodProd.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/adchebfun/test_cumprodProd.m
255
utf_8
ad925466641357b07038a554821ca857
% Test file for ADCHEBFUN CUMPROD() and PROD() function pass = test_cumprodProd % List of trigonometric functions to test. funcList = {@cumprod, @prod}; % Call the ADCHEBFUN testUnary() method to do the tests. pass = adchebfun.testUnary(funcList); end
github
foucart/Basc-master
test_erf.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/adchebfun/test_erf.m
293
utf_8
65098e37dfe952095bf84c9a721a9c11
% Test file for ADCHEBFUN error and related functions function pass = test_erf % List of functions related to the error function to test. funcList = {@erf, @erfc, @erfcinv, @erfcx, @erfinv}; % Call the ADCHEBFUN testUnary() method to do the tests. pass = adchebfun.testUnary(funcList); end
github
foucart/Basc-master
test_times.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/adchebfun/test_times.m
1,278
utf_8
4a4ed590e817b68051cbb49cc8b9f02b
% Test file for ADCHEBFUN times function pass = test_times % Initialise pass vector pass = zeros(3, 5); % Tolerance for Taylor testing tolOrder = 1e-2; tolDiff = 1e-14; % The function handle we're working with: func = @times; % Compare values [err, lin] = adchebfun.valueTestingBinary(func); % Confirm that the err...
github
foucart/Basc-master
test_fevalJump.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/adchebfun/test_fevalJump.m
1,682
utf_8
deeafdc16d7e2b84bca668e05538a6f0
% Test file for ADCHEBFUN feval and jump functions function pass = test_fevalJump % List of airy functions to test, with different number of inputs fevalFun = @(u) feval(u, .3); jumpFun = @(u) jump(u, .5, -1); % List of trigonometric functions to test. funcList = {fevalFun, jumpFun}; % Tolerance for Taylor testing ...
github
foucart/Basc-master
test_trig4.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/adchebfun/test_trig4.m
339
utf_8
8c650e60e48a62dd08a5c77f6c3ae68d
% Test file for ADCHEBFUN trigonometric and related functions, part 4/4 function pass = test_trig4 % List of trigonometric functions to test. funcList = {@csch, @sec, @secd, @sech, @sin, @sinc, @sind, @sinh, @tan, ... @tand, @tanh}; % Call the ADCHEBFUN testUnary() method to do the tests. pass = adchebfun.testUn...
github
foucart/Basc-master
test_cumsumDiffSumMean.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/adchebfun/test_cumsumDiffSumMean.m
1,413
utf_8
637c0154f712250869cf5633f6b228c1
% Test file for ADCHEBFUN CUMSUM, DIFF, MEAN and SUM function pass = test_cumsumDiffSumMean % List of trigonometric functions to test. funcList = {@diff, @(u)diff(u, 2), @(u)diff(u, 4), ... @sum, @(u) sum(u, -.25, .8), ... @cumsum, @(u)cumsum(u,2), ... @mean}; % Tol...
github
foucart/Basc-master
test_createMap.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/unbndfun/test_createMap.m
651
utf_8
7b594b1f3dd7d0bae3e6c91ac43e60d6
% Test file for unbndfun/createMap.m. function pass = test_createMap(pref) tol = 1e1*eps; % Doubly-unbounded domain: dom = [-Inf Inf]; map = unbndfun.createMap(dom); pass(1) = ( all(map.For([-1 1]) == [-Inf Inf]) ) && ... ( all(map.Inv([-1e100 1e100]) - [-1 1] < tol) ); % Singly-unbounded domain (left): dom = ...
github
foucart/Basc-master
test_mrdivide.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/unbndfun/test_mrdivide.m
1,089
utf_8
aad42f30f0a978c67f3bd6b847a917e7
% Test file for unbndfun/mrdivide.m function pass = test_mrdivide(pref) % Get preferences. if (nargin < 1) pref = chebfunpref(); end % Set the domain: dom = [-Inf 3*pi]; domCheck = [-1e6 3*pi]; %% Generate a few random points to use as test values: x = diff(domCheck) * rand(100, 1) + domCheck(1); % Case 1: X*B...
github
foucart/Basc-master
test_constructor.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/unbndfun/test_constructor.m
4,083
utf_8
a11cc15675121c69fdd3fd021e93fb4d
% Test file for unbndfun constructor and unbndfun/feval.m. function pass = test_constructor(pref) if ( nargin < 1 ) pref = chebfunpref(); end singPref = pref; singPref.blowup = true; % Seed for random number: seedRNG(6178); %% Functions on [-inf inf]: % Set the domain: dom = [-Inf Inf]; domCheck = [-1e2 1e2];...
github
foucart/Basc-master
test_diff.m
.m
Basc-master/basc_v1.0/chebfun-master/tests/unbndfun/test_diff.m
3,802
utf_8
51b71bd593501cd6182e3220bd867320
% Test file for unbndfun/diff. function pass = test_diff(pref) if ( nargin < 1 ) pref = chebfunpref(); end singPref = pref; singPref.blowup = true; % Seed for random number: seedRNG(6178); %% Functions on [-inf inf]: % Set the domain: dom = [-Inf Inf]; domCheck = [-1e2 1e2]; % Generate a few random points to...