ATLAB Sample Exam Questions University of Houston ENGI 1331
COMPUTING FOR ENGINEERS - Sample Exam Questions – MATLAB
The questions refer to material in MATLAB by Palm, 3rd edition.
Questions 1 – 15 (Chapters 1 – 6). Questions 16 – 24 (Chapters (7 – 9).
1. If matrix A is defined in MATLAB as
A = [1,4,3,2 ; -3,4,-5,1 ; 5,6,1,2 ; -2,-3,5,6] What is the output of the command
C =
...[Show More]
ATLAB Sample Exam Questions University of Houston ENGI 1331
COMPUTING FOR ENGINEERS - Sample Exam Questions – MATLAB
The questions refer to material in MATLAB by Palm, 3rd edition.
Questions 1 – 15 (Chapters 1 – 6). Questions 16 – 24 (Chapters (7 – 9).
1. If matrix A is defined in MATLAB as
A = [1,4,3,2 ; -3,4,-5,1 ; 5,6,1,2 ; -2,-3,5,6] What is the output of the command
C = A(1:3 , 2:3) ?
2. For matrix A as defined in Problem 1, what is the output of the MATLAB command
sum(A) ?
3. Write the two main uses of the MATLAB colon operator, in four words or less, each.
4. In MATLAB, if b = 4 and c = 5, write the output of the following:
~(b = = c & b = = 4)
5. After executing the MATLAB command p=polyfit(x,y,n), explain in 15 words or less
what is contained in p. What is the size of p?
6. For the matrix A defined in Problem 1, what is the MATLAB result of
A .*(4*eye(4))
7. In twenty words or less what does this MATLAB command do:
subplot(m,n,p)
8. Write MATLAB code of 5 lines or less that multiplies together the first 30 integers
without writing all the integers in a long statement.
9. If a=[2,1,1], what are the MATLAB results of the operations
polyval(a,1) and polyval(a,[2,3]) ?
[Show Less]