|20-CS-110-001||Introduction to Computer Science||Fall 2010|
Due: September 30, 2010
Submit matlab source code via blackboard. See submit page for instructions.
|Your projects will be matlab solutions to some nearly real world problems.|
To open Matlab click "Start", click "Mathematics", then select
"Matlab". There are three windows. The window on the right is the
console window and is where commands are executed.
To edit a file, in Matlab drop the "File" menu, click "New", then select "M-file". A blank (editor) window opens. In that window type v=[1 2 3] and save by dropping the "File" menu in the editor window then clicking "Save As...". A file chooser opens. Where it says "Enter file name:" type "first.m" then click on "Save". Now, in the console window type first. The result is
v = 1 2 3What you have just done is created a simple Matlab program and run it. The output is shown above.
In this part of the assignment you will create one Matlab program that solves a lot of problems, listed below, and displays output for each. Call the program first (therefore it is in a file named first.m). There should be a comment before each problem solution in the Matlab code. Comments begin with %. Submit via blackboard using these instructions. At the top of the file add a comment which includes your ucfilespace user name so I can check out your portfolio page.
Since there are 15 problems to solve it is best to run the solution to each in the console to make sure it works, then edit the solution into the file first.m. When finished, run first.m to make sure that all the solutions are correct. The list of problems is as follows: