// Function nest // // Same functionality as to the code that is in the your text, page 3. // // Brooke Beardsley, coded for NEIU Math304 // 8/10/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, type in the following commands: // nest(4,[-1, 5, -3, 3, 2], 1/2, [0,0,0,0,0]) // nest(4,[-1, 5, -3, 3, 2], 1/2) function nest_out=nest(d, c, x, b) [LHS,RHS]=argn(0) if RHS<4 then b=zeros(d,1) end y=c(d+1) for i=d:-1:1 y=y.*(x-b(i))+c(i); end nest_out=y endfunction // once you have completed this, please do the following: // 1 - Comment each line of code, and describe what it does // 2 - update this code so that the 'd' variable is no longer required, // and have scilab auto-determine what d should be given the size of 'c' // // Please print / handwrite your solutions so that it may be turned in.