Script started on Sat 19 Jan 2008 11:59:11 AM EST inky:337 $ ssh nsm.buffalo.edu ssh_exchange_identification: Connection closed by remote host inky:337 $ ssh orange.math.buffalo.edu ringland@orange.math.buffalo.edu's password: Last login: Sat Jan 19 11:57:43 2008 from cpe-74-77-149-239.buffalo.res.rr.com UB Linux/UBiquity Red Hat Enterprise Linux WS release 4 (Nahant Update 2) 2.6.9-22.EL November 2005 ringland@orange:~ringland@orange ~]$ ssh linux.nsm.buffalo.edu ringland@linux.nsm.buffalo.edu's password: Last login: Sat Jan 19 11:58:01 2008 from orange.math.buffalo.edu UB Linux/UBiquity Red Hat Enterprise Linux WS release 4 (Nahant Update 4) 2.6.9-42.ELsmp December 2006 ming.eng.buffalo.edu: /nsm/home/ringland WELCOME To The UBiquity Distributed Computing Environment --------------------------- Node News ------------------------------- Type 'motd' to see this message again. Please check the SENS home page, "http://www.sens.buffalo.edu/", on a regular basis. Useful Information can be found there regarding system updates, computer policies (no screen locks, no remote logins to lab systems, etc.), software (use of "use", "use update", and so on), and available system resources. Type "firefox" to start a web browser so you can access this site. ---------------------------------------------------------------------- PLEASE DO NOT run more then 1 CPU intensive process on Node timeshares. If you need more resources for the work you are doing, please e-mail nodehelp@eng.buffalo.edu. We appreciate your understanding and cooperation in this matter. ====================================================================== 10 Aug 2007: The default versions of Matlab, Mathematica and Maple have been upgraded on all SENS UNIX/Linux systems. Please e-mail nodehelp@eng.buffalo.edu if there are any problems. ringland@ming(51-DING!)> mkdir mth337 ringland@ming(52-12:00pm)> cd mth337 ringland@ming(53-12:00pm)> gedit ex2.maple & [1] 27594 ringland@ming(54-12:01pm)> (gedit:27594): Gtk-WARNING **: cannot open display: [1] Exit 1 gedit ex2.maple ringland@ming(54-12:01pm)> exit logout Connection to linux.nsm.buffalo.edu closed. [ringland@orange ~]$ ssh -X linux.nsm.buffalo.edu ringland@linux.nsm.buffalo.edu's password: Last login: Wed Jan 9 16:51:02 2008 from orange.math.buffalo.edu UB Linux/UBiquity Red Hat Enterprise Linux WS release 4 (Nahant Update 4) 2.6.9-42.ELsmp January 2002 luthor.eng.buffalo.edu: /nsm/home/ringland WELCOME To The UBiquity Distributed Computing Environment --------------------------- Node News ------------------------------- Type 'motd' to see this message again. Please check the SENS home page, "http://www.sens.buffalo.edu/", on a regular basis. Useful Information can be found there regarding system updates, computer policies (no screen locks, no remote logins to lab systems, etc.), software (use of "use", "use update", and so on), and available system resources. Type "firefox" to start a web browser so you can access this site. ---------------------------------------------------------------------- PLEASE DO NOT run more then 1 CPU intensive process on Node timeshares. If you need more resources for the work you are doing, please e-mail nodehelp@eng.buffalo.edu. We appreciate your understanding and cooperation in this matter. ====================================================================== 10 Aug 2007: The default versions of Matlab, Mathematica and Maple have been upgraded on all SENS UNIX/Linux systems. Please e-mail nodehelp@eng.buffalo.edu if there are any problems. ringland@luthor(51-12:01pm)> cd mth337 ringland@luthor(52-12:01pm)> gedit ex2.maple& [1] 31265 ringland@luthor(53-12:01pm)> (gedit:31265): Gtk-WARNING **: cannot open display: [ ARGH. Will write file locally, then paste it in ... ] [1] Exit 1 gedit ex2.maple ringland@luthor(53-12:02pm)> cat > ex2.maple # Day 2 Maple exercise # 1 # Use a "for" loop to print all the even numbers from 2 through 10. for i from 1 to 5 do print( 2*i ); end do; unassign('i'): # 2 # Use a "for" loop to print the numbers 1, 2, 4, 7, 11, 16, 22. # The difference between successive elements in the sequence # increases by one each time. I'll call that difference "a". # There are 7 elements in the sequence. n := 1; a := 0; for i from 1 to 7 do print(n); a := a + 1; n := n + a; end do: unassign('i'): # 3 # Use "seq" to generate all the odd numbers from 1 through 19 as a sequence, and as a list. myseq := seq( 2*i+1, i=0..9 ); mylist := [myseq]; # 4 # Modify your loop in part 1, to print all the even numbers between 2 and 20 # except 16. for i from 1 to 10 do if i <> 8 then print( 2*i ); end if; end do: unassign('i'): # 5 # Create an Array the right size for the printed numbers in part 4, # and put those numbers into the Array. myarray := Array(1..9); indx := 0; for i from 1 to 10 do if i <> 8 then indx := indx + 1; myarray[indx] := 2*i; end if; end do: unassign('i','indx'): myarray; # Maple won't display big Arrays: may want to do this: convert(myarray,list); ringland@luthor(54-12:02pm)> use maple |\^/| Maple 11 (X86 64 LINUX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2007 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > quit bytes used=770360, alloc=655240, time=0.01 ringland@luthor(55-12:02pm)> maple ex2.maple > ex2.maple.txt ringland@luthor(56-12:03pm)> cat ex2.maple.txt |\^/| Maple 11 (X86 64 LINUX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2007 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. # Day 2 Maple exercise > # 1 # Use a "for" loop to print all the even numbers from 2 through 10. > > for i from 1 to 5 do > print( 2*i ); > end do; unassign('i'): 2 4 6 8 10 > # 2 # Use a "for" loop to print the numbers 1, 2, 4, 7, 11, 16, 22. > # The difference between successive elements in the sequence # increases by one each time. I'll call that difference "a". # There are 7 elements in the sequence. > > n := 1; n := 1 > a := 0; a := 0 > for i from 1 to 7 do > print(n); > a := a + 1; > n := n + a; > end do: unassign('i'): 1 2 4 7 11 16 22 > # 3 # Use "seq" to generate all the odd numbers from 1 through 19 as a sequence, and as a list. > > myseq := seq( 2*i+1, i=0..9 ); myseq := 1, 3, 5, 7, 9, 11, 13, 15, 17, 19 > mylist := [myseq]; mylist := [1, 3, 5, 7, 9, 11, 13, 15, 17, 19] > # 4 # Modify your loop in part 1, to print all the even numbers between 2 and 20 # except 16. > > for i from 1 to 10 do > if i <> 8 then > print( 2*i ); > end if; > end do: unassign('i'): 2 4 6 8 10 12 14 18 20 > # 5 # Create an Array the right size for the printed numbers in part 4, # and put those numbers into the Array. > > myarray := Array(1..9); myarray := [0, 0, 0, 0, 0, 0, 0, 0, 0] > > indx := 0; indx := 0 > for i from 1 to 10 do > if i <> 8 then > indx := indx + 1; > myarray[indx] := 2*i; > end if; > end do: unassign('i','indx'): > > myarray; [2, 4, 6, 8, 10, 12, 14, 18, 20] > # Maple won't display big Arrays: may want to do this: > > convert(myarray,list); [2, 4, 6, 8, 10, 12, 14, 18, 20] > > quit bytes used=1709496, alloc=1310480, time=0.02 ringland@luthor(57-12:03pm)> exit logout Connection to linux.nsm.buffalo.edu closed. [ringland@orange ~]$ exit logout Connection to orange.math.buffalo.edu closed. inky:337 $ exit exit Script done on Sat 19 Jan 2008 12:04:59 PM EST