cis 101: computer programming and problem solving usman roshan department of computer science njit
Post on 21-Dec-2015
224 views
TRANSCRIPT
Syllabus
• Office hours:• Course website:
– http://www.cs.njit.edu/usman/courses/cis101_spring06– Course powerpoint presentations and announcements will be
posted on website
• Course description: Learn MATLAB and use it to solve engineering and scientific problems
• Exams: Short in-class quizzes and one final• Homeworks: Problems assigned every week• Cheating policy: No cheating will be tolerated• Makeup exams: Only health related documented
excuses will be accepted
About this course
• Mainly focused around MATLAB
• We will take engineering and scientific problems and solve them using MATLAB
• Our focus is not to derive formulas but to learn how to program and solve problems using programming
• We may learn some C++ if time permits but MATLAB itself offers a lot to explore
Defining variables in MATLAB
Variable_name = A numerical value, or a computable expression
Example 1 Example 2
Problem Solving I
costan sin
tan2
2 2
x x x
x
Verify that the indentity shown is correct by calculatingeach side of the equation using x
5
Problem Solving III
T T T T eS Skt ( )0
To=Initial temperature of object at time t=0Ts=temperature of chamber object is placed intoT=temperature of object at time tk=constant
Temperature of object rises according to function shown below
If a soda can (from inside a hot car) at 120F is placed into a refrigerator with 38F hat is the temperature after 3 hours (k=0.45)?