Skip to content
Snippets Groups Projects
Commit 0a7955f6 authored by Cristian Galperti's avatar Cristian Galperti
Browse files

addwavegen method sets basestructure correcly, setup builds simdata

parent 5f54d62f
No related branches found
No related tags found
No related merge requests found
...@@ -451,8 +451,8 @@ classdef SCDclass_algo ...@@ -451,8 +451,8 @@ classdef SCDclass_algo
end end
end end
function obj = buildworkspacetpstruct(obj) function buildworkspacetpstruct(obj)
% obj = buildworkspacetpstruct(obj) % buildworkspacetpstruct(obj)
% %
% This funtion builds workspace structures containing % This funtion builds workspace structures containing
% replicas of all tunable parameters structures in the data % replicas of all tunable parameters structures in the data
...@@ -491,8 +491,8 @@ classdef SCDclass_algo ...@@ -491,8 +491,8 @@ classdef SCDclass_algo
evalin('base','clear temp;'); %cleanup evalin('base','clear temp;'); %cleanup
end end
function obj = buildworkspacesimdata(obj) function buildworkspacesimdata(obj)
% obj = buildworkspacesimdata(obj) % buildworkspacesimdata(obj)
% %
% This function builds a SCDsimdata structure % This function builds a SCDsimdata structure
% containing the necessary timeseries to support % containing the necessary timeseries to support
...@@ -503,9 +503,10 @@ classdef SCDclass_algo ...@@ -503,9 +503,10 @@ classdef SCDclass_algo
% the algorithm % the algorithm
simdata = struct; simdata = struct;
if obj.mdscontainer.numwavegens>0 numwavegens=obj.mdscontainer.getnumwavegens();
obj.mdscontainer=obj.mdscontainer.setwavegenbasestruct([obj.getname '_simdata']); if numwavegens>0
for wgidx=1:obj.mdscontainer.numwavegens %obj.mdscontainer=obj.mdscontainer.setwavegenbasestruct([obj.getname '_simdata']);
for wgidx=1:numwavegens
wg=obj.mdscontainer.mdswavegens(wgidx); wg=obj.mdscontainer.mdswavegens(wgidx);
eval(['simdata.' wg.gettarget '=timeseries;']); eval(['simdata.' wg.gettarget '=timeseries;']);
end end
...@@ -571,6 +572,8 @@ classdef SCDclass_algo ...@@ -571,6 +572,8 @@ classdef SCDclass_algo
end end
% add to algo's mds object container % add to algo's mds object container
obj.mdscontainer=obj.mdscontainer.addwavegen(wavegen); obj.mdscontainer=obj.mdscontainer.addwavegen(wavegen);
% set default wavegen base structure name
obj.mdscontainer=obj.mdscontainer.setwavegenbasestruct([obj.getname '_simdata']);
end end
function obj = printwavegens(obj) function obj = printwavegens(obj)
...@@ -723,6 +726,7 @@ classdef SCDclass_algo ...@@ -723,6 +726,7 @@ classdef SCDclass_algo
% after this call % after this call
obj.updatetemplatetp; obj.updatetemplatetp;
obj.buildworkspacetpstruct; obj.buildworkspacetpstruct;
obj.buildworkspacesimdata;
SCDconf_setConf('sim'); SCDconf_setConf('sim');
end end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment