dsCheckData doesn't work for data matrix

3 views
Skip to first unread message

Wei, Jingjin

unread,
Nov 15, 2019, 10:47:34 PM11/15/19
to DynaSim Users
Hi all,

In many functions we have 
data = dsCheckData(data, varargin{:});
% note: calling dsCheckData() at beginning enables analysis function to
% accept data matrix [time x cells] in addition to DynaSim data structure.

But I tried that in two versions of Matlab and neither worked.

In 2018b it's :
Unable to perform assignment because dot indexing is not supported for variables of
this type.

Error in dsCheckData (line 69)
  data.pop1_data=data;

Error in dsCalcFR (line 69)
data = dsCheckData(data, varargin{:});


In 2017a its:
Field assignment to a non-structure array object.

Error in dsCheckData (line 69)
  data.pop1_data=data;

It seems that if the data matrix is DatMat, then you need to do 
dat.E_v = DatMat;
result = dsCalcFR(dat);   % NOT result = dsCalcFR(DatMat);

Best,
Jingjin

Erik Roberts

unread,
Nov 17, 2019, 8:49:11 PM11/17/19
to Wei, Jingjin, DynaSim Users
it takes a dynasim data structure, not a data matrix, right? what are you passing into the function?

-- 
You received this message because you are subscribed to the Google Groups "DynaSim Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dynasim-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dynasim-users/BN7PR03MB3633624734D93D516C220BACA7730%40BN7PR03MB3633.namprd03.prod.outlook.com.

Wei, Jingjin

unread,
Nov 18, 2019, 3:39:08 PM11/18/19
to Erik Roberts, DynaSim Users
Hi Erik,

In many analytic functions in dynasim, at the very begining there is this line: 
% Check inputs
data=dsCheckData(data, varargin{:});
  % NOTE: calling dsCheckData() at beginning enables analysis/plotting functions to
  %       accept data matrix [time x cells] in addition to DynaSim data structure.
I tried to use a data matrix [time x cells] on functions like dsPlot and dsCalcPower. I do not see it working.

Best,
Jingjin

From: Erik Roberts <erobe...@gmail.com>
Sent: Sunday, November 17, 2019 8:49 PM
To: Wei, Jingjin <jing...@bu.edu>
Cc: DynaSim Users <dynasi...@googlegroups.com>
Subject: Re: [DS] dsCheckData doesn't work for data matrix
 
Reply all
Reply to author
Forward
0 new messages