Vinoo Ganesh
CSE 200 Exam 1 Practice
Vector Example Problem
5. (12 points, 2 each) Let x = [3 2 6 8] and y = [4 1 3 5] (the single quote after both
vectors indicates that they are column vectors). Wri
CSE 200 (Spring 2013)
Lecture 3
Questions
n Math Review
n Vectors/Matrices
n Colon Notation
n Vector/Matrix Operations
n
Vinoo Ganesh
Class Updates
n Lab
0 Due Today at 11:59 pm.
n Update
n Get
in Par
function mandel (N,xnum,xmin,xmax,ymin,ymax)
%N = the number of iterations
%xnum = the number of points on the x axis
%xmin, xmax = the minimum and maximum x values
%ymin, ymax = the minimum and maxim
function zoom_mandelbrot()
% ZOOM_MANDELBROT Zoom into a
Mandelbrot Set
% Uses the function mandel.m to
produce a Mandelbrot Set
% Allows user to select a region and
zoom into the image
xmin = -2.5;
x
n
k
A
B
= 3;
=4;
= [1 : 1 : n*k];
= reshape (A, n , k);
zr1 = zeros (1,k );
zr2 = zeros (1,n+2);
C = [zr1 ; B ; zr1];
D = C';
E = [zr2 ; D ; zr2];
A = E'
%
function res(A)
[n, k] = size (A)
top = A (1
Application: Are Low Real Interest Rates
Good for the Economy ?
A misleading view of real interest rates is that high real interest
rates are bad because they choke off investment while low real
inter
> 2+2
ans =
4
> sin(0)
ans =
0
> sin(180)
ans =
-0.8012
> sin(3.1415926)
ans =
5.3590e-008
> sin(pi)
ans =
1.2246e-016
> sin(Pi)
? Undefined function or variable 'Pi'.
%Pop quiz
%MATLAB is case sensit
y = A(1) * 1 + A(2) * x + A(3) * x.^2 + A(4) * x.^3
.
function polyCompute(A,x)
x = zeros
Lab 4:
In class we talked about solving a matrix equation to fit a line to a
collection of points. Today we ar
CSE 200 (Spring 2013)
Lecture 15
Class Updates
n Matlab Workspaces
n File I/O (Very Brief Introduction)
n Course Evaluation
n
Vinoo Ganesh
Class Updates
n Hope
everyone had a great break!
n Please
tur
CSE 200 (Spring 2013)
Lecture 12
Class Updates
n Examples
n
Vinoo Ganesh
Class Updates
n Your
exam date has been finalized for:
Monday, March 4th from 4:00 5:30 pm
Location:
Adamakos Liu inclusive: Wi
CSE 200 (Spring 2013)
Lecture 14
Class Updates
n Presentation by Dr. Chamberlain
n Midterm 1
n
Vinoo Ganesh
Class Updates
n No
Lab on Friday
#
Presentation by Dr. Chamberlain
#
Midterm 1
#
Midterm Sta
CSE 200 (Spring 2013)
Lecture 5
Questions
n Strings Review
n Syms and Booleans
n Trig
n Decision Making
n
Vinoo Ganesh
Class Updates
n EIT
Update
Matlab no longer available on remote desktop
n How
is
CSE 200 (Spring 2013)
Lecture 16
Class Updates
n Course Evals Summary Part 1
n Plotting (2D)
n
Vinoo Ganesh
Class Updates
n Re-Submission
Grades are on Blackboard
n If
you havent already, you may pick
CSE 200 (Spring 2013)
Lecture 6
Questions
n Lab 1 Questions
n Boolean Math
n Disp
n Cylindrical/Spherical Coordinates
n Decision Making
Vinoo Ganesh
n
Class Updates
n Lab
1 due tonight at 11:59 pm CST
CSE 200 (Spring 2013)
Lecture 4
Questions
n Math Review (Part 2)
n Colon Notation Review
n Matrices
n Strings
n
Vinoo Ganesh
Class Updates
n Participation
Fridays Lab
n Lab
Quiz will be graded and ava
CSE 200 (Spring 2013)
Lecture 2
Questions
n The Matlab Environment
n Variables
n Matlab as a Calculator
n Functions
n Example
Vinoo Ganesh
n
Orders of Business
n Lab
0 is up! You can find it on the La
CSE 200 (Spring 2013)
Lecture 7
Class Updates
n Cylindrical Coordinates/Spherical Coordinates
n For Loops
n While Loops
n Switch Statements
n Brief Functions
Vinoo Ganesh
n
Class Updates
n Lab
1 was d
CSE 200 (Spring 2013)
Lecture 8
Class Updates
n Quiz 3
n For Loops
n While Loops
n
Vinoo Ganesh
Class Updates
n All
Lab 1s have been graded and uploaded to
blackboard
You should have gotten an email
CSE 200 (Spring 2013)
Lecture 10
Class Updates
n Exam Info
n Demo
n is-functions
n Memory management in Matlab
n
Vinoo Ganesh
Class Updates
n Make
sure you finish and submit Lab 2 by 11:59 pm
on Wedne
CSE 200 (Spring 2013)
Lecture 9
Class Updates
n Converting For/While Loops
n Switch
n Data Input
n Data Output
n
Vinoo Ganesh
Class Updates
n Get
started on Lab 2!
n Today,
will be one of the quicker
CSE 200 (Spring 2013)
Lecture 11
Class Updates
n Functions (with multiple return types)
n Rounding
n Examples
n
Vinoo Ganesh
Class Updates
n Lab
2 is due today by 11:59 pm CST!
n Your
exam date has be
> 2+2
ans =
4
> sin(0)
ans =
0
> sin(180)
ans =
-0.8012
> sin(3.1415926)
ans =
5.3590e-008
> sin(pi)
ans =
1.2246e-016
> sin(Pi)
? Undefined function or variable 'Pi'.
%Pop quiz
%MATLAB is case sensit