Matlab Assignment #2

Conditional Statements

READING: Chapter 6 in you Matlab book

SUBMISSION: Submit all m-files you create with a diary that shows their execution for several test cases.

Due: 3/11/99

1.) Do problem 6.3-1 from your text

2.) Write a script file that reads a (numeric) input value from the user. If the number is negative,

print "negative" on the screen. If it is positive but less than 100, print "positive". If it is equal to or greater than 100, print "really big".

3.) Write a script that reads a time(t) and a position (x) from the user and computes the force on the

ram from Excel assignment #2. The conditions are repeated here for convenience:

The rocket fires for 10 seconds with a force of 5,000 Newtons

The wall is at x=500 meters and opposes the Ram with a force of -30,000 Newtons

Print the resulting force on the screen. Show all 4 possible cases in your diary file.

4.) Do problem 6.5-2 from your Matlab text