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
end
end
function obj = buildworkspacetpstruct(obj)
% obj = buildworkspacetpstruct(obj)
function buildworkspacetpstruct(obj)
% buildworkspacetpstruct(obj)
%
% This funtion builds workspace structures containing
% replicas of all tunable parameters structures in the data
......@@ -491,8 +491,8 @@ classdef SCDclass_algo
evalin('base','clear temp;'); %cleanup
end
function obj = buildworkspacesimdata(obj)
% obj = buildworkspacesimdata(obj)
function buildworkspacesimdata(obj)
% buildworkspacesimdata(obj)
%
% This function builds a SCDsimdata structure
% containing the necessary timeseries to support
......@@ -503,9 +503,10 @@ classdef SCDclass_algo
% the algorithm
simdata = struct;
if obj.mdscontainer.numwavegens>0
obj.mdscontainer=obj.mdscontainer.setwavegenbasestruct([obj.getname '_simdata']);
for wgidx=1:obj.mdscontainer.numwavegens
numwavegens=obj.mdscontainer.getnumwavegens();
if numwavegens>0
%obj.mdscontainer=obj.mdscontainer.setwavegenbasestruct([obj.getname '_simdata']);
for wgidx=1:numwavegens
wg=obj.mdscontainer.mdswavegens(wgidx);
eval(['simdata.' wg.gettarget '=timeseries;']);
end
......@@ -571,6 +572,8 @@ classdef SCDclass_algo
end
% add to algo's mds object container
obj.mdscontainer=obj.mdscontainer.addwavegen(wavegen);
% set default wavegen base structure name
obj.mdscontainer=obj.mdscontainer.setwavegenbasestruct([obj.getname '_simdata']);
end
function obj = printwavegens(obj)
......@@ -723,6 +726,7 @@ classdef SCDclass_algo
% after this call
obj.updatetemplatetp;
obj.buildworkspacetpstruct;
obj.buildworkspacesimdata;
SCDconf_setConf('sim');
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