Commit 4d09cafd authored by Jakob Gabriel's avatar Jakob Gabriel
Browse files

bugfixes: all unitttests pass again.

parent 68484bab
......@@ -232,7 +232,7 @@ classdef Backstepping < handle & matlab.mixin.Copyable
% select default grid
if nargin < 3
myGrid = thisKernel(1).grid{1};
myGrid = thisKernel(1).domain(1).grid;
end
spacing = myGrid(2) - myGrid(1);
assert(numeric.near(diff(myGrid), spacing, 1e-6), ...
......
......@@ -1183,12 +1183,12 @@ classdef (InferiorClasses = {?quantity.Symbolic}) Discrete ...
additionalPlotOptions{:});
elseif obj.nargin() == 1
plot(...
obj(rowIdx, columnIdx, figureIdx).grid{1}(:), ...
obj(rowIdx, columnIdx, figureIdx).domain(1).grid(:), ...
obj(rowIdx, columnIdx, figureIdx).valueDiscrete, ...
additionalPlotOptions{:});
elseif obj.nargin() == 2
misc.isurf(obj(rowIdx, columnIdx, figureIdx).grid{1}(:), ...
obj(rowIdx, columnIdx, figureIdx).grid{2}(:), ...
misc.isurf(obj(rowIdx, columnIdx, figureIdx).domain(1).grid(:), ...
obj(rowIdx, columnIdx, figureIdx).domain(2).grid(:), ...
obj(rowIdx, columnIdx, figureIdx).valueDiscrete, ...
additionalPlotOptions{:});
ylabel(labelHelper(2), 'Interpreter','latex');
......@@ -1213,8 +1213,8 @@ classdef (InferiorClasses = {?quantity.Symbolic}) Discrete ...
end
function myLabel = labelHelper(gridNumber)
if ~isempty(obj(rowIdx, columnIdx, figureIdx).gridName)
myLabel = "$$" + greek2tex(obj(rowIdx, columnIdx, figureIdx).gridName{gridNumber}) + "$$";
if ~isempty(obj(rowIdx, columnIdx, figureIdx).domain)
myLabel = "$$" + greek2tex(obj(rowIdx, columnIdx, figureIdx).domain(gridNumber).name) + "$$";
else
myLabel = "";
end
......
......@@ -95,14 +95,14 @@ classdef TaylorPolynomial < quantity.Discrete
function set.coefficients(obj, c)
obj.coefficients = c;
myLocalGrid = obj.monomial(1).grid{1};
myLocalGrid = obj.monomial(1).domain(1).grid;
obj.monomial = signals.faultmodels.TaylorPolynomial.getMonomials(...
length(c), obj.t, obj.tStar, myLocalGrid, obj.T);
% update the global value
val = obj.computeGlobalSignal(obj.monomial, ...
c, ...
obj.grid{1}, ...
obj.domain(1).grid, ...
obj.occurrence);
obj.valueDiscrete = val;
......
......@@ -490,7 +490,7 @@ classdef (InferiorClasses = {?quantity.Discrete, ?quantity.Function, ?quantity.S
obj(1).coefficient.stateTransitionMatrix(...
'gridName1', 'z', 'gridName2', 'zeta'));
end
z = F0(1).grid{1};
z = F0(1).domain(1).grid;
Phi(:,:,1) = F0.subs("zeta", 0);
if isempty(B)
Psi(:,:,1) = quantity.Discrete.empty();
......
......@@ -103,14 +103,14 @@ classdef WhiteGaussianNoise
function P = cumulativeDistributionFunction(obj, varargin)
p = obj.probabilityDensityFunction(varargin{:});
P = p.cumInt("x", p(1).grid{1}(1), "x");
P = p.cumInt("x", p(1).domain(1).lower, "x");
end
function p = probability(obj, z)
% computes the probability, that a value is inside the domain
% abs(x) < z
P = obj.cumulativeDistributionFunction;
P = obj.cumulativeDistributionFunction();
p = 2 * P.at(abs(z - obj.mue)) - 1;
......
......@@ -123,7 +123,7 @@ z = sym("z", "real");
fsym = sym({f1, f3 ; f2, f2; f1, f3});
fsym = symfun(- fsym, z);
z = f(1).grid{:};
z = f(1).domain.grid;
Fsym = fsym(z);
%%
......@@ -162,7 +162,7 @@ f = quantity.Function({f1, f3 ; f2, f2; f1, f3 }, quantity.Domain.defaultDomain(
F = f * f.';
z = f(1).grid{:};
z = f(1).domain.grid;
Fsym = fsym(z);
%%
......@@ -197,7 +197,7 @@ f = quantity.Function(...
quantity.Domain("z", linspace(0, 1, 42)'));
%%
verifyEqual(testCase, f(1).grid, {linspace(0,1, 42).'});
verifyEqual(testCase, f(1).domain.grid, linspace(0,1, 42).');
verifyEqual(testCase, f(1).domain.gridLength, 42);
end
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment