From e3c80ba4393053b685a88b4fff92d01a8e203b45 Mon Sep 17 00:00:00 2001 From: Ferdinand Fischer <ferdinand.fischer@uni-ulm.de> Date: Tue, 1 Sep 2020 10:20:21 +0200 Subject: [PATCH] Fixed bug in generation of the function handle for the gevrey functions --- +quantity/Discrete.m | 2 +- +signals/GevreyFunction.m | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/+quantity/Discrete.m b/+quantity/Discrete.m index 31db4d8..6427a2e 100644 --- a/+quantity/Discrete.m +++ b/+quantity/Discrete.m @@ -77,7 +77,7 @@ classdef (InferiorClasses = {?quantity.Symbolic}) Discrete ... %% input parser myParser = misc.Parser(); - myParser.addParameter('name', "", @mustBe.gridName); + myParser.addParameter('name', "", @mustBe.gridName); % #fixme: shouldn't it be a text? myParser.addParameter('figureID', 1, @isnumeric); myParser.parse(varargin{:}); diff --git a/+signals/GevreyFunction.m b/+signals/GevreyFunction.m index 49ae632..229096f 100644 --- a/+signals/GevreyFunction.m +++ b/+signals/GevreyFunction.m @@ -77,9 +77,11 @@ classdef GevreyFunction < signals.BasicVariable % The offset is only added to the zero-order derivative. offset_k = optArgs.offset * 0^derivativeOrder; - v = quantity.Function(@(t) offset_k + optArgs.gain * ... - optArgs.g(t, derivativeOrder, ... - domain.upper, 1 ./ ( optArgs.order - 1)), domain); + functionHandle = eval("@(" + domain.name + ... + ") offset_k + optArgs.gain * optArgs.g(" + domain.name + ... + ", derivativeOrder, domain.upper, 1 ./ ( optArgs.order - 1))"); + + v = quantity.Function(functionHandle, domain); end end -- GitLab