// Function nest // // Same functionality as to the code that is in the your text, page 3. // // Brooke Beardsley, coded for NEIU Math304 // 8/31/2009 // // Instructions to Load this: // 1 - Install SCILAB (go to www.scilab.org) // 2 - Open this file (using scilab) // 3 - "Execute"->"Load into Scilab" // 4 - on the Scilab console, test this function and review the code // the goal is you understand how this works function test_out=sampleone(arglist) argsize=size(arglist) for i=1:1:argsize(2) disp(arglist(i)) end test_out=argsize(2) endfunction function test_out=sampletwo(arglist) argsize=size(arglist) for i=1:1:argsize(2) if (arglist(i)>10) then disp(string(arglist(i))+" is bigger than 10.") else disp(string(arglist(i))+" is not bigger than 10.") end end test_out=argsize(2) endfunction function test_out=samplethree(arglist) argsize=size(arglist) clf() for i=1:1:argsize(2) x(i)=i end plot(x, arglist,'ro ') test_out=argsize(2) endfunction