From ccbcc2cee7f53131bcf5ccd8c3f110c5d5f5b813 Mon Sep 17 00:00:00 2001 From: galperti <cristian.galperti@epfl.ch> Date: Tue, 21 Jun 2022 12:37:45 +0200 Subject: [PATCH] castdata abstract method added --- classes/SCDclass_mdswg.m | 5 ++++- classes/SCDclass_mdswgsigsingle.m | 6 +++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/classes/SCDclass_mdswg.m b/classes/SCDclass_mdswg.m index 590731b..71c8f32 100644 --- a/classes/SCDclass_mdswg.m +++ b/classes/SCDclass_mdswg.m @@ -29,7 +29,7 @@ classdef SCDclass_mdswg < matlab.mixin.Heterogeneous overrideshot % =1 if instantiated with overridden shot number, in this case this shot number will be always used during actualization overrideshotn % shot number in case of overridden shot number - bound % true if wavegen has been bound to another SCDDS component + bound % true if wavegen has been bound to another SCDDS component end properties @@ -257,6 +257,9 @@ classdef SCDclass_mdswg < matlab.mixin.Heterogeneous % Populates the corresponding MDS node with workspace values autopopulatemds(obj, shot) + + % casts to proper type + out = castdata(obj, in); end end diff --git a/classes/SCDclass_mdswgsigsingle.m b/classes/SCDclass_mdswgsigsingle.m index 20f9f9f..b7cf04e 100644 --- a/classes/SCDclass_mdswgsigsingle.m +++ b/classes/SCDclass_mdswgsigsingle.m @@ -143,7 +143,11 @@ classdef SCDclass_mdswgsigsingle < SCDclass_mdswg units = wgentryval.(structparam).DataInfo.Units; obj.autopopulatemdscommon(shot, obj.tdiexpr, dim, data, units, [baseparam '.' structparam '[' num2str(obj.destidx) ']']); - end + end + + function out = castdata(obj, in) + out = single(in); + end end end -- GitLab