0001
0002
0003
0004
0005
0006
0007
0008 s = struct('string', 'first', 'number', -12);
0009 s(2) = struct('string', 'second', 'number', 12);
0010 s(3) = struct('string', 'third', 'number', -3);
0011 s(4) = struct('string', 'fourth', 'number', -5);
0012 s(5) = struct('string', 'fifth', 'number', 12.5);
0013
0014 s2 = s( structtest( s, @testfunction ) );
0015
0016
0017
0018
0019
0020 s2_len = length(s2);
0021
0022 disp('Structure 2 and 5 should be printed.');
0023
0024 for i=1:s2_len
0025 s2(i)
0026 end