[Scilab-users] Scilab dynamic lists and correct use of null()?

Samuel Gougeon sgougeon at free.fr
Fri Aug 16 10:29:27 CEST 2013


Hello,

Le 15/08/2013 21:26, Rafael Guerra a écrit :
> Hello, Could someone explain why the following error occurs when 
> trying to remove using null() an element from a Scilab dynamic list 
> constructed as follows: test(1).parm1 = [ 1 2 3 4]; test(1).parm2 = 
> ones(3,3); test(2) = test(1); test(2).parm3 = "hello"; test(1)=null();
The syntax to remove an element of an array of structures is the same as 
for any other array: with [].
null() is used to remove some fields.
Then,
test(1) = []  // works
If test was a m-by-n array of structures,
test(:,2)=[] // would remove all its second column ; etc

Regards
Samuel




More information about the users mailing list