Here is a sample script I found on-line a wile ago that shows the abilities of array manipulations in SCILAB. It produces all the verses of the 12 days of Christmas. Very interesting.
the_verses={'A partridge in a pear tree.'; 'Two turtle doves, and ' ;
'Three French hens, '; 'Four calling birds, ' ;
'Five golden rings, '; 'Six geese a laying, ' ;
'Seven swans a swimming, '; 'Eight maids a milking, ' ;
'Nine ladies dancing, '; 'Ten lords a leaping, ' ;
'Eleven pipers piping, '; 'Twelve drummers drumming, '};
the_days={'first';'second';'third';'fourth';'fifth';'sixth';
'seventh';'eighth';'ninth';'tenth';'eleventh';'twelfth'};
for day=1:12
printf('On the %s day of Christmas my true love gave to me:\n', the_days(day));
presents = the_verses(day1);
printf('%s\n', presents(:));
printf('\n');
end
SCILAB Script - 12 Days of Christmas
- Evan Tromblay
- Casual User
- Posts: 13
- Joined: Wed Oct 26, 2011 7:00 pm
- Fedya Rovic
- Active User
- Posts: 41
- Joined: Wed Oct 26, 2011 7:16 pm
Re: SCILAB Script - 12 Days of Christmas
Interesting, but how about posting any more practical pieces of code?
"Everybody gets so much information all day long that they lose their common sense", G. Stein
Re: SCILAB Script - 12 Days of Christmas
Yeah, something more demonstrative of scilab's abilities in the context of this forum - energy, risk, safety, etc. would have been more interesting, I agree.Fedya Rovic wrote:Interesting, but how about posting any more practical pieces of code?
- Dale Valenti
- Casual User
- Posts: 12
- Joined: Wed Nov 02, 2011 8:23 pm
Re: SCILAB Script - 12 Days of Christmas
There are hundreds, probably thousands of such scripts out there, Gradphys. A two minute search with google will find some in any specific application area you want!GradPhys wrote:Yeah, something more demonstrative of scilab's abilities in the context of this forum - energy, risk, safety, etc. would have been more interesting, I agree.Fedya Rovic wrote:Interesting, but how about posting any more practical pieces of code?