Back to Schedule
CS 123 - Lab 4 - Functions
Due: Before class on Wednesday, March 10th at 9:24am
- Exercises 6.2, 6.7, 6.9, & 6.15
- Draw the stack trace for the following program with this function:
function [ res ] = stringDouble( myStr )
res = [myStr,myStr];
and when this script is executed:
str = 'Xyz';
out1 = stringDouble(str);
out2 = stringDouble(out1);
To check that you are correct, try running this program AFTER you drawn the stack trace.
- All the files for an assignment must be saved in a folder of the form Lab04-USERNAME within your cs123/lab/ directory. For example, if your Ithaca username is jsmith1, you must place all related documents, m-files, text files, etc, in the folder cs123/lab/lab04-jsmith.
- When you are done, you must create a zip file called lab04-USERNAME.zip and email it to me (firstname.lastname@example.org) as an attachement before the Thursday morning deadline. Please use the subject line: "CS123 Lab04 USERNAME"
- You also have to bring a printed report that splices together your answers, code, and plots. Please keep this focused and short. This is due at the beginning of class on Thursday.
- Your labs will be graded on correctness, design and form (i.e., comments, indentation, clear plots with good labels, etc.)
- Labs that are between 1-minute and 1-day late will be graded at 90%. Labs that are more than 1-day late will be graded at 80%.