ENEL101 Problem set 1 Basic Matlab Calculations

$30.00

Download Details:

  • Name: Assignment-1-o0ct2t.zip
  • Type: zip
  • Size: 147.51 KB

Category:

Description

5/5 - (1 vote)

Questions from Chapter 1
1. Given π‘₯ = 0.2 calculate the following expression: 𝑄 = 5 πœ‹*.+ cos π‘₯ * 𝑒0.
2. Given π‘₯ = 0.2 and calculate the following expression: 𝑄 = ln 𝑒 βˆ’ tan π‘₯ *.
3. Given π‘₯ = 1.5 and 𝑦 = 0.5 compute 𝑄 = cos (
9:;
< )
4. Given π‘₯ = 8.3 and 𝑦 = 2.4, evaluate
𝑄 = π‘₯* + 𝑦* βˆ’ 9;
:;.
ENEL101 Assignment 1 Page 2
5. In question 4 assume that 𝑦 = 2π‘₯. Find 𝑄 given π‘₯ = 2.1.
6. Given π‘₯ = 2 and 𝑦 = 3, find the solution of 2 2 A x B xy Q A B == = , , tan( ).
7. The equation that identifies the response of a particular circuit is
𝑄 = βˆ’ 𝑅
2𝐿 +
𝑅
2𝐿
*
βˆ’ 1
𝐿𝐢
Determine the value of 𝑄 for 𝑅 = 800Ξ©, 𝐢 = 1πœ‡F and 𝐿 = 1π‘šH.
8. The number of combinations Q of taking π‘Ÿ objects out of 𝑛 objects is given by ( )
!
! !
n Q
rnr = -ο€­ .
Determine the number of combinations of taking 2 cards from a deck of 52 cards. Use the built in
function factorial.
9. The current 𝑄 (in amps) 𝑑 seconds after closing the switch in a series RL circuit is
𝑄 = M
N
1 βˆ’ 𝑒OP
QR .
Given 𝑉 = 120 volts, 𝑅 = 240Ξ© and 𝐿 = 0.5 henrys, calculate the current 0.003 seconds after the
switch is closed.
10. The formula for changing the base of a logarithm is:
π‘™π‘œπ‘”W 𝑁 = YZ[\ ]
YZ[\ W.
Calculate 𝑄 = log_ 0.085 using Matlab’s log π‘₯ function.
Questions from Chapter 2
11. Create a column vector 𝑄 that has the following elements: 0*
0.*; , sin* <
0 , 6.1, ln 29*, and 133.
12. Create a row vector 𝑄 in which the first element is 3 and the last element is 38, with an increment of
5 between the elements as (3,8,…,38).
13. Define the variables π‘₯ = 0.5 and 𝑦 = 1 and generate a 3×3 diagonal matrix 𝑄 with diagonal values
of π‘₯, sin π‘₯𝑦 and tan :
9
. Use the function diag() for this purpose
14. Use the eye command to create a 4×4 identity matrix
𝑄 =
1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1
.
ENEL101 Assignment 1 Page 3
15. Form a 3 2 Β΄ο‚΄ matrix 𝑄 with the columns of (1,1,1) and (2,2,2).
16. Create the following matrix,
103
104
105
106
107
Q
é ΓΉοƒΉ
Γͺοƒͺ ΓΊοƒΊ
Γͺοƒͺ ΓΊοƒΊ
= Γͺοƒͺ ΓΊοƒΊ
Γͺοƒͺ ΓΊοƒΊ
Γͺοƒͺ ΓΊοƒΊ
Γͺοƒͺ ΓΊοƒΊ ë û
by using linspace, zeros, ones and the transpose operator. Do not type in the individual elements
explicitly.
NOTE: You may transpose a vector/matrix using transpose([x y]) or a single quote [x y]’
17. Create the following matrix 𝑄 given as
123456
7 8 9 10 11 12
13 14 15 16 17 18
Q
é ΓΉοƒΉ
Γͺοƒͺ ΓΊοƒΊ =
ë û
From this create the following variable:
Create a six element row vector named X that contains the elements of the second row of 𝑄.
18. Using zeros, and ones commands create the following matrix
𝑄 =
1 1 1 1
0 0 0 0
0 0 0 0
1 1 1 1
.
19. Given matrices 𝑋 = 1 1
1 1 and π‘Œ = 0 0
0 0 , create the matrix 𝑄 such that
𝑄 = [𝑋 π‘Œ].
20. Base on the matrices 𝑋, π‘Œ in question 19 create a matrix 𝑄 such that
𝑄 = 𝑋 π‘Œ
𝑋 π‘Œ .