Spring 2001 CS100M Exercise E7: Box Scope Diagrams due in lecture Thu 3/01 suppose we have the following two functions defined: file f.m +-----------------------------------------------------+ | function [x,y] = f(a,b) | | % draw a picture whenever this line is reached! | | x = b-a; | | y = a; | | % draw a picture whenever this line is reached! | +-----------------------------------------------------+ file g.m +-----------------------------------------------------+ | function x = g(a,b) | | % draw a picture whenever this line is reached! | | a = 2*a; | | b = 2*b; | | [a,b] = f(b,a); | | a = 2*a; | | b = 3*b; | | x = a-b; | | % draw a picture whenever this line is reached! | +-----------------------------------------------------+ and suppose the following code is executed in the Command Window: a = 10; b = 20; x = 30; % draw a picture whenever this line is reached! x = g(15, 6); % draw a picture whenever this line is reached! draw the 6 box scope diagrams requested: + trace the code by hand + whenever you reach a line $% draw a picture...$, draw a fresh copy of the box scope diagram in your answer you may use the $boxscope$ code to generate a text picture for printing, but make sure you can do the tracing by hand: we often have a tracing question on exams. _______________________________________________________________________________ Submission: + submit hard-copy (printed out or handwritten) in lecture. + remember to include your name, netid, cuid, exercise#, date.