% J Hundley
% Lab07
% March 19, 2015
%cfw_
re-write Lab06 using user-defined functions
*READ A DATA FILE*
Read the input values from a text data file
Compute the distance
While not end of file read one set of input values
compute the distance
count hit an
% J Hundley
% Lab03.m
% February 12, 2015
%cfw_
You can use trigonometry to find the height of a building.
Suppose you measure the angle between the line of sight and the
horizontal line connecting the measuring point and the building.
You can calculate t
%
%
%
%
%
J Hundley
Lab05
March 5, 2015
Matrix manipulation, random-number generator, subscripts.
Find the distances too far, too shirt, and hit the pool
clc, clear all
%*CONSTANT*
BALCONY_HT = 12;
'alcony Height
G = 32;
%gravitational acceleration
MIN_AN
% J Hundley
% Lab02.m
% February 5, 2015
%cfw_
a) You can use trigonometry to find the height of a building.
Suppose you measure the angle between the line of sight and the
horizontal line connecting the measuring point and the building.
You can calculate
% J Hundley
% Lab08
% April 9, 2015
%cfw_
2015 AU softball games results
use textread; save selected data
max/mean/min AU runs scored: all, SEC with # of games
max/mean/min runs allowed:
all, SEC with # of games
game(s) with extra innings; regular game 7
COMP 1200: INTRO TO COMPUTING FOR ENGINEERS AND SCIENTISTS (MATLAB)
Instructor:
Jacqueline H Hundley, PhD
Lecturer
Office: 3101-F Shelby Center
Office Hours: See Canvas
And by appointment
Official email for
this course is via
Canvas
There are
two COMP1200
% Pseudo-code of Calculate Grade Algorithm
% 1: Input number of categories, and save in num_cat
% 2: initialize final grade to 0, save in weighted_grade
% 3: for i = 1 to num_cat
% 4:
input assignments in current category,save in num_assgn
% 5:
input weig
% Pseudo-code of Improved Bubble Sort Algorithm
% 1: unsorted_array: array [1.n] of numbers
% 2: for i = 1 to size of unsorted_array
% 3:
bool_var = false
% 4:
for j = 1 to size of unsorted_array - i
% 5:
if elem at pos j in sorted_array > elem at pos j +
Student Name: _
Email ID (ex: ras0054): _
COMP 1200
Midterm
Write your name and student ID (email) at the top of this sheet.
Do not open this exam until instructed to do so.
You can use your own scratch paper. I do not need the scratch
paper. Submit only
Section 1: MATLAB Basics
1) Create a script called hw1_q1_script.m to solve the following arithmetic statement using
Matlab save the result in a variable called q1_answer.
a. Hint: The answer should be 164.7939
3
470
2
b. 3 5 + 13 3314
2) Create another s
Comp 1200
Matlab
1/22/07
Announcements
Final Exam April 30, 2007 Lab 2 is due Sunday January 28 by 11:55 pm Getting help from TAs (GTA Info) Lab 1 scores released soon
Program Development Process
1. 2. 3. 4. 5.
Problem Analysis and Specificat
Comp 1200
Matlab
1/17/07
Announcements
Final Exam April 30, 2007 Lab 1 is due January 19 11:55pm Lab 2 will be posted next Monday
Vector Variables
Variables are the name associated to a group of boxes so to speak MyVector = 12 -3 5 56 -7
Comp 1200 M
1/29/2007
Announcements
Final Exam April 30, 2007 Waiting to do Lab 2 until the last minute Send questions about your lab scores to your respective lab instructors.
Programming with if statements
Asks the question Is this sta
Comp 1200
Matlab
1/24/07
Announcements
Final Exam April 30, 2007 Lab 2 is due Sunday January 28 by 11:55 pm Getting help from TAs (GTA Info) Lab 1 scores are released
Lab 1 scores
Two ways to see your score Go to WebCT and click on "MyGr
Matlab
The Saga
Really Begins
Announcements
Final Exam April 30, 2007 Lab 1 is due January 19 11:55pm Read your e-mails Getting help
Arithmetic
Symbols
-, +, /, *, ^
Order of operations Not just a fancy calculator All answers ha