This preview shows page 1. Sign up to view the full content.
Unformatted text preview: Matlab Project 1 for MAS 3114
Due Friday, September 16
1. Deﬁne a Matlab function A=list(m,n) which produces an m×n matrix A whose entries are the ﬁrst mn nonnegative integers in order.
For instance, list(3,2) = 0
1
2 3
4
5 2. (a) Deﬁne a Matlab function B=rowop1(A,i,j,r) which adds r
times the ith row of A to the jth row of A.
(b) Deﬁne a Matlab function B=rowop2(A,i,j) which interchanges
the ith and jth rows of A.
(c) Deﬁne a Matlab function B=rowop3(A,i,r) which multiplies the
ith row of A by r.
(d) Use the functions you deﬁned in (a), (b), and (c) to (interactively) convert the 3 × 3 matrix list(3,3) into reduced row
echelon form.
3. (a) Deﬁne a Matlab function e=consist(A,b) which returns 1 if
the system A*x=b has at least one solution, and 0 if it has no
solutions.
(b) Let A=list(5,5), b=ones(5,1), and c=[0; 0; 0; 0; 1]. Use
your function to determine whether the systems A*x=b and A*x=c
have solutions. ...
View
Full
Document
This note was uploaded on 12/27/2011 for the course MAS 3114 taught by Professor Olson during the Fall '08 term at University of Florida.
 Fall '08
 Olson

Click to edit the document details