Anda di halaman 1dari 18

Group D03:

Member: 1. Norberto SoaresCelestino (03411740007005)


2. Elizia da Costa Alves (03411740007007)
3. Djody Virgiawan Ramadhan (03411740000016)
4. Muhammad Farizqi (03411740000043)
1. The programming of MATLAB provides what tools can simplify repetitive
computing tasks?
A. scripting
B. Matrix
C. Automation
D. Mathematics
E. GUI3
Answer: A, C,
Solutions: scripting and automation
1. In a series of commands executed in the MATLAB session to resolve the problem
can be stored in?
A. Command History
B. Numerical computing
C. Laboratory
D. Script file
E. File-M
Answer: D, E
Solution: called a script file / called M-file
2. When we first run MATLAB, then the first display that we encounter is known as?
A. Computer desktop
B. laptop desktop
C. Talks bar
D. MATLAB Desktop
E. Desktop
Answer: D
Solution: known as MATLAB Desktop
3. scripts are files that contain sequences?
A. MATLAB Statement
B. Word
C. Mac OS X
D. Microsoft windows
E. Calculation
Answer: A
Solution: MATLAB statement
4. By typing the file name at the command prompt, can we run the script and get the
results in?
A. LINPACk
B. window command
C. Workspace Start
D. Workspace
E. shortcut workspace
Answer: B
Solution: Command Window
5. MATLAB allows any matrix manipulation?
A. Arithmetic Operators
B. Analogy operator
C. Plotting
D. Data
E. Operator
Answer: C, D
Solution: Plot and Data
6. We can study the demo to create and visualize both 2D and 3D graphics found in the
Help then click on?
A. Labels
B. Laboratory
C. Linear
D. Demos
E. Graphics
Answer: D, E
Solution: Demos and Graphics
7. What function writes data formatted to a computer monitor or file?
A. Mathematics
B. Fprintf function
C. MathWorks
D. Labels
E. Laboratory
Answer: B
Solution: Fprintf function
8. can this command be used to store the calculation results to?
A. Vector line
B. Vector Column
C. File
D. Linear Vector
E. Vector
Answer: C
Solution: to file
9. Does MATLAB have several functions to describe a specific surface plot?
A. Scalar matrix
B. Function of Sphere
C. Vector matrix
D. Cylinder function
E. Column matrix
Answer: B, D
Solution: Sphere function and Cylinder function
10. Does MATLAB have several functions to describe a specific surface plot?
A. Scalar matrix
B. Function of Sphere
C. Vector matrix
D. Cylinder function
E. Column matrix
Answer: B, D
Solution: Sphere function and Cylinder function

11. The correct equation for this plot?


A. sin 2𝜋𝑓𝑡
B. cos 2𝜋𝑓𝑡
C. sin 𝑓𝑡
D. 2 sin 2𝜋𝑓𝑡
E. 2 cos 2𝜋𝑓𝑡
Answer: A
Resolution:

clc

f=5:5:100;
t=1:0.1:10;

yt=0;
for
i=1:length(f)

y=sin(2*pi*f(i)*
t);
yt=yt+y;
end

figure(1)
plot(t,yt)
xlabel('t')
ylabel('y')
12. The correct equation for this plot?
1
A. cos 2𝜋𝑓𝑡
2
B. 2 cos 2𝜋𝑓𝑡
C. cos 2𝜋𝑓𝑡
D. 2 cos 𝑓𝑡
1
E. sin 2𝜋𝑓𝑡
2
Answer: C
Resolution:
clc

f=5:5:100;
t=1:0.1:10;

zt=0;
for i=1:length(f)
z=cos(2*pi*f(i)*t);
zt=zt+z;
end

figure(1)
plot(t,zt)
xlabel('t')
ylabel('z')
axis([1 10 -10 30])

13. The correct equation for this plot?


A.
0 −5 ≤ 𝑡 ≤ 0
2
10𝑡 − 5𝑡 0≤𝑡≤8
𝑣(𝑡) = 624 − 5𝑡 8 ≤ 𝑡 ≤ 16
36𝑡 + 12[𝑡 − 16]2 16 ≤ 𝑡 ≤ 26
𝑡−26
{ 2136𝑒 10 26 ≤ 𝑡 ≤ 50

B.
0 −5 ≤ 𝑡 ≤ 0
2
10𝑡 − 5𝑡 0≤𝑡≤8
𝑣(𝑡) = 624 − 5𝑡 8 ≤ 𝑡 ≤ 16
36𝑡 + 12[𝑡 − 16] 16 ≤ 𝑡 ≤ 26
𝑡−26
{ 2136𝑒 − 10 26 ≤ 𝑡 ≤ 50

C.
0 −5 ≤ 𝑡 ≤ 0
2
10𝑡 − 5𝑡 0≤𝑡≤8
𝑣(𝑡) = 624 − 5𝑡 8 ≤ 𝑡 ≤ 16
36𝑡 + 12[𝑡 − 16]2 16 ≤ 𝑡 ≤ 26
𝑡−26
{ 2136𝑒 − 10 26 ≤ 𝑡 ≤ 50

D.
0 −5 ≤ 𝑡 ≤ 0
10𝑡 2 − 5𝑡 0≤𝑡≤8
𝑣(𝑡) = 62𝑡 − 5𝑡 8 ≤ 𝑡 ≤ 16
36𝑡 + 12[𝑡 − 16]2 16 ≤ 𝑡 ≤ 26
𝑡−26
{ 2136𝑒 − 10 26 ≤ 𝑡 ≤ 50
E.
0 −5 ≤ 𝑡 ≤ 0
2
10𝑡 − 5𝑡 0≤𝑡≤8
𝑣(𝑡) = 624 − 5𝑡 8 ≤ 𝑡 ≤ 16
364 + 12[𝑡 − 16]2 16 ≤ 𝑡 ≤ 26
26−𝑡
{ 2136𝑒 10 26 ≤ 𝑡 ≤ 50
Answer: C
Resolution:
clc

t1=-5:1:0;
t2=1:1:8;
t3=9:1:16;
t4=17:1:26;
t5=26:1:50;
t=[[[[t1 t2] t3] t4] t5];

v=0*t1;
v=[v 10*t2.^2-5*t2];
v=[v 624-5*t3];
v=[v 36*t4+12*(t4-16).^2];
v=[v 2136*exp(-(t5-26)./10)];

plot(t,v)
xlabel('t')
ylabel('v(t)')
14. Plot 𝑦 = 𝑥 sin 𝑥 sin 𝑥 with 𝑥 ∈ [0,10] and interval 1.

A.

B.

C.

D.
E.
Answer: A
Resolution:
clc

x=1:1:100;

y=x.^sin(x)./sin(x);

plot(y,x)

15. Calculation
clc
fprintf('x
cos(x)\n')
fprintf('------------------
-\n')
x=-pi;
while x<=pi
y=cos(x);
fprintf('%8.3f %8.2f
\n',x,y);
x=x+pi/4;
end

The three x values from the table generated by this script are ...
A. −2.356
B. −1.571
C. −0.785
D. 0.784
E. 1.571
Answer: B
Resolution:
x cos(x)
-------------------
-3.142 -1.00
-2.356 -0.71
-1.571 0.00
-0.785 0.71
0.000 1.00
0.785 0.71
1.571 0.00
2.356 -0.71
3.142 -1.00

log 𝑎 sin[𝑏 2 ]
16. Plot 𝐴 = agains b if 𝑎 ∈ [1,10] maupun 𝑏 ∈ [0,100] to result intervals 1.
𝑎

A.

B.

C.

D.

E.
Answer: C
Resolution:
clc

a=1:1:10;
b=0:1:100;
An=0;
for i=1:length(a);

A=log10(a(i)).*sin(b.^2
);
An=An+A;
end

subplot(3,1,2)
plot(b,An)

17. An Acetylene bottle has radius r = 0.5 m have a hemispherical top. The height of a
cylinder part is h = 21 m. The volume of the bottle is...…
a. 16755 meter kubik
b. 16752 meter kubik
c. 16.7552 meter kubik
d. 16,7552 meter kubik
e. 17552 meter kubik

Answer : C

Solution:

% This Script computes the volume of an acatylene bottle


% user is promted to enter
% a radius r for a hemispherical top
% a height h for a cylindrical part
clc %Clear Screen
disp('This Script computes the volume of an acetylene bottle')
disp(' ') %Display blank line
r=input('Enter the radius of acetylene bottle in meters')
h=input('Enter the height of cylindrical part of acetylene bottle in
meters')
Vol_top=(2*pi*r^3)/3; % Calculating the volume of hemispherical top
[m3]
Vol_cyl=pi*r^2*h; % Calculating the volume of cylindrical bottom
[m3]
Vol_total=Vol_top+Vol_cyl % Calculating the total volume of acetylene
[m3]
disp(' ') % Display blank line
str = ['The volume of the acetylene bottle is', num2str(Vol_total), 'cubic
meters.'];
disp(str);

>> This Script computes the volume of an acetylene bottle


Enter the radius of acetylene bottle in meters0.5

r=

0.5000

Enter the height of cylindrical part of acetylene bottle in meters21

h=

21

Vol_total =

16.7552

The volume of the acetylene bottle is16.7552cubic meters.

18. Know that a wave has an equation yn = sin (2πf(n)t). Where the value of fs = 1000 Hz, fn
= 16 Hz and ts = 1 / fs is known. The wave is enlarged 4 times. Which of the following is not
a graph of multiples of 1,2,3 and 4 of the fn if the interval value t is 0-1 s …

a.

b.
c.

d.

e.

Answer : E

Solution :

clc
clear all
close all
fs=1000;
ts=1/fs;
t=0:ts:1;
fn=16;
% yn=sin(2*pi*fn*t);
yn=zeros(length(t),4);
for i=1:4
yn(:,i)=sin(2*pi*(fn*i)*t);
end
figure(1)
subplot(1,1,1)
plot(t,yn(:,1))
title('fn=16')
xlabel('time')
ylabel('amplitude')

figure(2)
subplot(1,1,1)
plot(t,yn(:,2))
title('fn=16*2')
xlabel('time')
ylabel('amplitude')

figure(3)
subplot(1,1,1)
plot(t,yn(:,3))
title('fn=16*3')
xlabel('time')
ylabel('amplitude')

figure(4)
subplot(1,1,1)
plot(t,yn(:,4))
title('fn=16*4')
xlabel('time')
ylabel('amplitude')
clc

19. Plot 𝑦 = 𝑥 sin 𝑥 sin 𝑥 for 𝑥 ∈ [0,10] with interval 1.

A.

B.
C.

D.

E.
Answer: A
Solution:
clc

x=1:1:100;

y=x.^sin(x)./sin(x);

plot(y,x)
20. The value of is ...... ..((ln(1,6))4
a. 0.512
b. 0:41
c. 1.2
d. .0488
e. 0.00098
Answer D
Solutions
>> a = log (1.6);
>> b = a ^ 4

21. Results from × √5,2 (ln 2,5)


a. 3.05
b. 2:08
c. 4.5
d. 3
e. 8.1
Answer B
Solutions
>> a = sqrt (5.2);
b = log (2.5);
>> c = a * b
c = 2.0895

4,6
22. value of √ is……..
√8.8

a. 0.74
b. 0.72
c. 0, 65
d. 0.6
e. 0.99
Answer B
Solutions
>> a = sqrt (4.6);
>> b = sqrt (8.8);
c=a/b

c = 0.7230

log 𝑎 sin[𝑏 2 ]
23. Plot 𝐴 = against b if both 𝑎 ∈ [1,10] and 𝑏 ∈ [0,100] have interval 1.
𝑎

A.

B.

C.

D.
E.
ANSWER: C
SOLUTION:

clc

a=1:1:10;
b=0:1:100;
An=0;
for i=1:length(a);
A=log10(a(i)).*sin(b.^2);
An=An+A;
end

subplot(3,1,2)
plot(b,An)

24. Calculation
clc
fprintf('x cos(x)\n')
fprintf('-------------------\n')
x=-pi;
while x<=pi
y=cos(x);
fprintf('%8.3f %8.2f \n',x,y);
x=x+pi/4;
end

The resul for the ploting in table are


A. −2.356
B. −1.571
C. −0.785
D. 0.784
E. 1.571
Answer: B
Solution:
x cos(x)
-------------------
-3.142 -1.00
-2.356 -0.71
-1.571 0.00
-0.785 0.71
0.000 1.00
0.785 0.71
1.571 0.00
2.356 -0.71
3.142 -1.00
25. The trajectory of an object can be modeled as

where
y = height (m),
θ0 = initial angle (radians),
x = horizontal distance (m),
g = gravitational acceleration (=9.81 m/s2),
v0 = initial velocity (m/s), and
y0 = initial height.
What is the value of y if the estimated initial velocity is 28m / s, the initial height is
0m, the horizontal distance is 80m with the angle of 15 ... (g = 9.81 m / s2)
a. -137.8592
b. 137.8592
c. -137,8592
d. 137,8592
e. 13792

Answer : A.

Solution :

clear all
clc
% y= heigth (m),
% ?0 = initial angle (radians),
% x = horizontal distance (m),
% g = gravitational acceleration (=9.81 m/s^2),
% v0 = initial velocity (m/s), and
% y0 = initial height

% ANSWER %

y0=0;
v0=28;
teta=15;
x=80;
g=9.81

y = ((tan(teta))*x)-((g/(2*((v0^2))*((cos(teta))^2)))*(x)^2)+y0

>> g =

9.8100

y =
-137.8592