



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Review questions for chapters 8 to 12 of the cmps 1371 course, covering topics such as matlab functions, structures, matrices, file i/o, and recursion.
Typology: Assignments
1 / 7
This page cannot be seen from the preview
Don't miss anything!
Chapter 8 to Chapter 12 Review
x = struct('first', 'jim', 'last', 'bob', 'age', 14); y = struct('first', 'mary', 'last', 'sue', 'age', 13); z = struct('first', 'billy', 'last', 'joe', 'age', 19); collection = [ x y z ]; temp1 = rmfield(x,'first'); temp2 = setField(y, 'Intelligence', 0); z.last = 'uhhh'; collection = collection(1:2); temp3 = collection(2).last; temp4 = isfield(y, 'first'); What is the output of the following variables when the script above is executed: temp1 = temp2 = temp3 = temp4 = Problem – Matrices
A = [3 2 1; 6 5 4; 9 8 7]; B = [1 1 1; 0 0 0]; C = [A B']; D = ones(size(A)); B(1:2, 1:2) = A(3:end, 3:end); D(end, : ) = B(1, 1:3) + max(A) A(1:3, 3) = 0; What is the value of the following variables after the following script is executed: A = B = C = D = Problem – File I/O
Answers: