KEMBAR78
Matlab Exam Practice Problems | PDF | Mathematical Analysis | Mathematical Problem Solving
100% found this document useful (1 vote)
1K views5 pages

Matlab Exam Practice Problems

The document provides sample problems, questions, and commands for various chapters in a Matlab textbook. It includes examples of defining matrices, generating plots and random numbers, solving systems of equations, formatting output, and writing Matlab functions and programs.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
1K views5 pages

Matlab Exam Practice Problems

The document provides sample problems, questions, and commands for various chapters in a Matlab textbook. It includes examples of defining matrices, generating plots and random numbers, solving systems of equations, formatting output, and writing Matlab functions and programs.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 5

ELEC 206 Matlab Practice Questions Chapter 1 2 Questions Sample problems 1-1, 1-2, 1-4 Problem 15 a, b Sample problems

2-1, 2-2, 2- , Problems 1, 2, , 12, 1! Sample problems -1, -4 Problems 1, , !a, 1" Sample problem 4Problem 6 Sample problem 5-1 !, #, 15 Sample problems 6-1, 6-2 Problem 15, 1# Sample problems !-1, !-2, !Problem 1, 2 Sample problems "-1, "-2 Problem 1 Sample problems #-1, #-2 Problems 1, 6 Sample problem 10-2

4 5 6 ! " # 10

1$ %rue&'alse (circle )our choice*+ a$ % ' %he ,inal step o, the Engineering Problem-Solving Methodology is al-orithm .e/elopment$ b$ % ' %he semicolon (;* suppresses output 0hen use. 0ith M1%L12 comman.s$ c$ % ' %he transpose operator (T* interchan-es the ro0s an. columns o, a matri3$ .$ % ' %he disp comman. pauses a M1%L12 pro-ram an. prompts the user ,or input$ 2$ 4hich M1%L12 comman. -enerates a t0o-.imensional representation o, a three.imensional sur,ace5 a$ b$ mesh(z) contour(z) c$ .$ pie(x) figure(n)

$ 4hich M1%L12 comman. -enerates 100 uniform random numbers bet0een -5 an. 655 a$ b$ 10*rand(100)-5 10*rand(100,1)-5 c$ .$ 10*randn(100,1)-5 5*randn(100)-10

4$ 4rite the M1%L12 comman.s to .e,ine the ,ollo0in- matrices$ a$


1 G = 2 5 6

b$

F = [0$0

0$2

0$4

$$$

##$6

##$" 100$0]

5$ Sho0 the results -enerate. b) the ,ollo0in- M1%L12 comman.$ y = !"1 #"$; $"5 5"1; %"& '"!(; maxy = max(y)

6$ 7i/en the ,ollo0in- table o, line an. color options, 0rite the M1%L12 comman. to -enerate a plot ,or x vs y1 as a dotted green line an. x vs y2 as a dashed red line$ Line %)pe .otte. .ashe. 8n.icator ) -Color -reen re. 8n.icator g r

!$ 4hich M1%L12 comman. -enerates the solution to the s)stem o, e9uations *+=,5 a$ b$ + = *-, + = in.(*)*, c$ .$ + = sum(*"*,) + = ,**/

"$ 7i/en the ,ollo0in- matrices, sho0 the results -enerate. b) these M1%L12 comman. *"*0 0 = eye(!) * = 1 !; ! #( $ #$ 7i/en the ,ollo0in- matri3, sho0 the results -enerate. b) these M1%L12 comman.s$ . = #"& !"% 0"# 5"! %"$( a$ b$ h = find(.1#"5) high = .(h)

10$ 7i/en the ,ollo0in- matri3, sho0 the results -enerate. b) the M1%L12 comman.$ 2 = 1"!! #"&$ !"%1( fprintf(/2 = 3#"1f 4n/, 2)

11$ 4rite a M1%L12 function that accepts time t as an input an. returns a /olta-e correspon.in- to the ,ollo0in- e9uation+ v : e-tsin(5t*$

12$ 4rite a M1%L12 pro-ram to prompt the user ,or a time constant an. a ma3 time T, then -enerate a plot o, v : e-t&;$

1 $ 4rite the M1%L12 comman.s to -enerate a table o, con/ersions ,rom inches to centimeters$ %he ran-e o, inches shoul. be ,rom 0 to 6 in increments o, $

14$ 4rite a complete C66 pro-ram similar to that re9uire. b) E3am 1$

You might also like