[Scilab-users] How to assign column data to mlist?
jaipur
acj119 at nifty.com
Sat Jul 11 13:41:17 CEST 2015
When I already have column data, how shall I collect these data into a mlist?
For example, I have 2 column data,
data1=[11:20]'; data2=[21:30]';
I create a mlist,
MyMlist = mlist(['M', 'field1', 'field2', 'field3']);
I'd like to assign data1, data2 to field1, field2, and access them as
MyMlist(3).field1 and so on. And size(MyMlist) or length(MyMlist) should be
10.
I tried
MyMlist.field1= data1; MyMlist.field2= data2;
The result is
size(MyMlist) does not work.
length(MyMlist) is 3.
And
MyMlist(1) indicate !M field1 field2 field3 !
MyMlist(2) indicate the values of data1
MyMlist(3) indicate the values of data2
I understand these results as the definition of mlist. But I'd like to
assign column data into one compact mlist.
Someone could give me a suggestion?
--
View this message in context: http://mailinglists.scilab.org/How-to-assign-column-data-to-mlist-tp4032561.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com.
More information about the users
mailing list