{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

MATLABReview

# MATLABReview - Questions design by Billy Kihei 2010...

This preview shows pages 1–3. Sign up to view the full content.

Questions design by Billy Kihei © 2010 Vectors (Report any Errors): 1. What is V, B, A, C ? V = [3:4:20]; V(1:2) = [ 4 5 ]; B = V(end:-1:3); B(1) = B(2) + 3; A = find(B(2) == V); C = ~find(~(B == V(1:3))); 2. What is VV,G,W,T? VV = [4 5 2 3 0]; G = 'Ouch, my a\$\$' ; W = [G(2:2:4) 'g ' G]; VV>4; ~VV == 2; VV(3) = 1+2*2/2-1; T = find(VV<5&VV>2); 3. What is J,B,D,N,K? J = [4 0 3 23 546 5 32 0 6 7]; J(3:2:6) = []; B = [1:8].*2 + 2; D = J == B; N = ~J; K = N.*J; J(end:-1:end-1) = K(1) + K(2); 4. What is a,b,c,vec1? a = [6, 7, 2, 9, 3, 4, 2]; b = [2]; a(3) = []; vec1 = a==b; c = sum(vec1); 5. What is a,b,d,vec2, vec3? a = [6, 7, 2, 9, 3, 4, 2]; b = [2]; vec2 = mod(a,2)==1; vec3 = vec1+vec2; d = vec3.*a; 6. What is a, b, vec4, e? a = [6, 7, 2, 9, 3, 4, 2]; b = [2]; vec4 = find(a > 5); e = a(vec4) + 2; 7. What is a, b, vec5, f? a = [6, 7, 2, 9, 3, 4, 2]; b = [2]; vec5 = find(a < 5); f = vec5.^2; 8. What is a, b, vec6, f? a = [6, 7, 2, 9, 3, 4, 2]; b = [2]; vec6 = find(~(a < 5)); f = vec6([1 1 1]); 9. What is V, B, A, C ? V = [1:3:15]; V(3) = []; V(1:3) = []; V(3) = 8; V(4:6) = [8 8 7]; A = ~V + V; B = A + 3; C = B(5) + B(2) + B(1).^2; A = C==V; C = [3, C(1:1), A(1:2),V(end:-2:5)]; A = A(1:3) + A(3:-1:1); V(2:3).^2; V(2:3) + 1; V(2:3) = V(3:4) + 2;

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Questions design by Billy Kihei © 2010 B(7) = 89; Matrices (Note Any Errors): 10. What is M? M = [3 4 5; 6 9 3; 10 -4 -3] M(2:3,3:-1:2) = M([1 3],[3 1]) 11. What is M?
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 6

MATLABReview - Questions design by Billy Kihei 2010...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online