Commit 7de6f4cd authored by Ferdinand Fischer's avatar Ferdinand Fischer
Browse files

fixed the bugs caused by the rebase

parent 5d0a5695
......@@ -66,8 +66,7 @@ classdef (InferiorClasses = {?quantity.EquidistantDomain}) Domain < ...
end
function quan = Discrete(obj)
% Discrete casts the domain into a quantity.Discrete of with the values
% obj.grid.
% DISCRETE casts the domain into a quantity.Discrete with the values of obj.grid.
arguments
obj (1, 1) quantity.Domain;
end
......@@ -75,8 +74,8 @@ classdef (InferiorClasses = {?quantity.EquidistantDomain}) Domain < ...
end % quantity.Discrete()
function quan = Symbolic(obj)
% Discrete casts the domain into a quantity.Discrete of with the values
% obj.grid.
% SYMBOLIC casts the domain into a quantity.Symbolic with the grid name as symbolic
% value.
arguments
obj (1, 1) quantity.Domain;
end
......
function [tests] = testBasicVariable()
%TESTGEVREY Summary of this function goes here
% Detailed explanation goes here
tests = functiontests(localfunctions);
end
......@@ -16,15 +16,15 @@ function timesTest(testCase)
t = quantity.Domain.defaultDomain(13, "t");
a(1) = quantity.Discrete(t.grid, 'domain', t);
a(2) = quantity.Discrete(t.grid.^2, 'domain', t);
a(3) = quantity.Discrete(t.grid.^3, 'domain', t);
a(1) = quantity.Discrete(t.grid, t);
a(2) = quantity.Discrete(t.grid.^2, t);
a(3) = quantity.Discrete(t.grid.^3, t);
p = a .* a;
p_(1) = quantity.Discrete(t.grid.^2, 'domain', t);
p_(2) = quantity.Discrete(t.grid.^4, 'domain', t);
p_(3) = quantity.Discrete(t.grid.^6, 'domain', t);
p_(1) = quantity.Discrete(t.grid.^2, t);
p_(2) = quantity.Discrete(t.grid.^4, t);
p_(3) = quantity.Discrete(t.grid.^6, t);
testCase.verifyEqual( p.on(), p_.on(),'AbsTol', 1e-15)
......@@ -930,7 +930,6 @@ vInv = v.inv();
%% matrix example
t = quantity.Domain("t", linspace(0, pi));
[T, ~] = ndgrid(t.grid, s.grid);
K = quantity.Discrete(permute(repmat(2*eye(2), [1, 1, size(T)]), [3, 4, 1, 2]), [t, s], ...
......
......@@ -24,7 +24,7 @@ Z = quantity.Domain('z', linspace(0, 1, 101));
SI = quantity.Symbolic(sig, Z);
% compute step by function
si = quantity.Symbolic( misc.ss.setPointChange(0, 1, 0, 1, 1, "var", Z.name), 'domain', Z );
si = quantity.Symbolic( misc.ss.setPointChange(0, 1, 0, 1, 1, "var", Z.name), Z );
%
testCase.verifyEqual(si.on(), SI.on(), 'AbsTol', 6e-16);
......@@ -75,7 +75,7 @@ function basicVariable_Diff_test(tc)
T = quantity.Domain('t', linspace(0,1));
fun = t^2 * (1-t)^2;
F = quantity.Symbolic(fun, 'domain', T);
F = quantity.Symbolic(fun, T);
d1F = F.diff("t", 1);
d2F = F.diff("t", 2);
......
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