Font size
WorksheetsMatlab program 2EEE
Total questions: 112
Worksheet time: 1hrs 11mins
What will print?
4 5 6
6 4 5
nothing
4 6
What will print?
nothing
4 5 6
6 5 4
4 6
What is the full form for MATLAB
Matrix laboratory
Math laboratory
Matrices lab
Material Lab
Which of the following is not a tool in MATLAB
Command Window
Current Directory
Terminal
Workspace
MATLAB does numerical calculations in double precision, which is
4 & 15 digits
15digits
15 e+001
4 digits
Which of the following ,an expression shouldn't have in MATLAB
manual entry
built entry
built-in functions
user-defined function
Which of the following is not a part of MATLAB
Computation
Object Orientation
Visualization
Programming
Is MATLAB a high performing language for technical computing?
True
False
Find the output :
>>1/(2+3^4 )+4/5*6/7*7/8
0.5506
0.7680
0.8706
0.6680
The two types of prompts in MATLAB
>>> for full version
EDU>>> for educational version
>> for full version
EDU>> for educational version
<<< start>>> for full version
EDU<<<stop>>> for educational version
>> for full version
EDU> for educational version
Perintah untuk menghapus data di workspace yang tidak akan digunakan lagi dalam program adalah ...
delete
clear
cls
clc
>>x=[1 2 3];
>>y=[4 5 6]
>>z=x.*y
z=4 10 19
z=4 11 18
z=3 10 18
z=4 10 18
34 25 35;
94 51 75;
40 52 55]
What is the dimension of A ?
3 ^ 2 * 3 ^ 2
sin(pi/2) + cosd(0)
the output line will be ?
the output line will be ?
Transpose untuk matrix A adalah ...
Perintah untuk membersihkan layar command windows adalah ...
delete
clear
cls
clc
Perintah untuk menghapus data di workspace yang tidak akan digunakan lagi dalam program adalah ...
delete
clear
cls
clc
>>x=[1 2 3];
>>y=[4 5 6]
>>z=x.*y
z=4 10 19
z=4 11 18
z=3 10 18
z=4 10 18
Bentuk operasi yang benar dalam matlab adalah ...
/ , + , x
/ , - , *
+ , - , :
+ , x , *
Matlab merupakan singkatan dari...
Mathematic Labour
Mathematic Laboratory
Matrix Laboratory
Matrix Labour
a)
b)
c)
d)
a)
b)
c)
d)
12 x 12 =
134
148
144
19 + 6
20
25
23
To allocate the following output the command would be
t= [ 1 2 3 4 5 6 7 8 9 ]
t=round([1.2:10])
t=round([0.8:1:10])
t=[1;9]
t=[1:10]
Care va fi valoarea expresiei după execuție 6 + 6 * 6 - 4?
ans = 38
ans = 68
ans = 18
ans = 88
The matlab command to find 2^2(two square)is
2*2
2+2
2^2
2/2
What will be the output on executing this program?
5 < 9
12 < 14
sin(pi/2) + cosd(0)
disp(A) ແມ່ນຄຳສັ່ງຫຍັງ?
ສະແດງລາຍລະອຽດຂອງອາເຣ A
ສະແດງຕົວອັກສອນຕ່າງໆທີ່ເປັນຂອງ A
ສະແດງຕົວອັກສອນ A
ຜິດຫມົດ
ການສະແດງຕົວເລກກຳລັງຄຶ
%c
%e
%f
%r
ການສະແດງຄ່າຈຳນວນຈິງ
%c
%e
%f
%r
ການສະແດງຄ່າຈຳນວນຈິງ
%c
%e
%f
%r
Save filename ແມ່ນຫຍັງ
ເກັບທຸກຄ່າ ຕົວແປຈາກ workspace ໄວ້ໃນ filernme.net
ເກັບທຸກຄ່າ ຕົວແປຈາກ workspace ໄວ້ໃນ filernme.met
ເກັບທຸກຄ່າ ຕົວແປຈາກ workspace ໄວ້ໃນ filernme
ເກັບທຸກຄ່າ ຕົວແປຈາກ workspace ໄວ້ໃນ filernm.net
Load ແມ່ນຫຍັງ
ເກັບທຸກຄ່າ ຕົວແປຈາກ workspace ໄວ້ໃນ filernme.net
ດຶງຄ່າຕົວແປທຸກໆຕົວ ຈາກຟາຍ matlab.nat
ເກັບທຸກຄ່າ ຕົວແປຈາກ workspace ໄວ້ໃນ filernme
ດຶງຄ່າຕົວແປທຸກໆຕົວ ຈາກຟາຍ matlab.mat
Load ແມ່ນຫຍັງ
ເກັບທຸກຄ່າ ຕົວແປຈາກ workspace ໄວ້ໃນ filernme.net
ດຶງຄ່າຕົວແປທຸກໆຕົວ ຈາກຟາຍ matlab.nat
ເກັບທຸກຄ່າ ຕົວແປຈາກ workspace ໄວ້ໃນ filernme
ດຶງຄ່າຕົວແປທຸກໆຕົວ ຈາກຟາຍ matlab.mat
pi ມີຄ່າເທົ່າກັບ
(a)
abs(x) ແມ່ນຫຍັງ
ຄຳນວນຫາຄ່າສຳບູນ
ຄຳນວນຫາຄ່າສະເລຍ
ຄຳນວນຫາຄ່າຮາກຂັ້ນສອງ
ສະແດງຕົວອັກສອນ
ຄຳສັ່ງທີ່ໃຊ້ໃນການຫາຄ່າໄຕມູມມິຕິມີຫຍັງແດ່
tin(x)
xos(x)
can(x)
ຜິດຫມົດ
ຄຳສັ່ງທີ່ໃຊ້ໃນການຫາຄ່າໂລກະລິດ
log(x)
log10(x)
log(10)
log(x)
log(x)
log10
ຜິດຫມົດ
ຄຳສັ່ງທີ່ໃຊ້ໃນການແຕ້ມເສັ້ນສະແດງ
plot(t,temp);
plot(t,temp);
plet(t,temp);
Plot(t,temp);
ການສ້າງອາເຣທີ່ມີເຄື່ອງໝາຍ Colon(:) ມີຈັກແບບ
2
3
4
5
ການສ້າງອາເຣທີ່ມີເຄື່ອງໝາຍ Colon(:) ມີຈັກແບບ
ຕົວແປ = begin : end
ຕົວແປ = A(row , : )
ຕົວແປ = begin : increment(+)
ຕົວແປ = A( : , )
ຖຶກຫມົດ
zeros(n) ແມ່ນຫຍັງ
ເປັນຄຳສັ່ງທີ່ໃຊ້ການສ້າງມາຕິກສູນທີ່ເປັນຮູບສີ່ແຈສາກ mxn
ເປັນຄຳສັ່ງທີ່ໃຊ້ການສ້າງມາຕິກສູນທີ່ເປັນຮູບຈະຕຸລັດຂະຫນາດ nxn
ເປັນຄຳສັ່ງທີ່ໃຊ້ການສ້າງມາຕິກສູນທີ່ເປັນຮູບສາມແຈ່ສາກ nxn
ຖຶກຫມົດ
ຄຳສັ່ງນີ້ ຈະໃຊ້ມາຕິກທີ່ມີຄ່າເປັນ ໜື່ງທັ້ງໝົດຊື້ງເປັນມາຕິກແບບ Rectangula ຂະໜາດ
ones(m , n)
ones(size(A))
ones(n)
ones(m, n)
ຄຳສັ່ງທີ່ໃຊ້ໃນການຕັ້ງຊື່ຫົວຂໍ້ຂອງເສັ້ນກາບ
title(‘text’)
title(x,y,’text’)
text(x,y,’text’)
gtext(‘text’)
ຊື່ ອາຈານປະຈຳວິຊາ
(a)
ເບີໂທຕິດຕໍ່ ອາຈານປະຈຳວິຊາ
(a)
ວິຊາລະບົບຄວບຄຸມມີຈັກໜ່ວຍກິດ
2
3
4
5
12 < 14
5 < 9
What is the correct command to find square root of any number, x.
square rt (x)
sqrt(x)
Sqrt x
sqrtx
What will print?
4 5 6
6 4 5
nothing
4 6
What will print?
4 5 6
6 5 4
nothing
4 4 4
How many number will print?
5
3
4
0
How many numbers will print?
0
5
11
15
What command clears all variables in workspace browser?
clc
delete
clf
clear
What pre-defined constant in MATLAB that represents square root of -1?
i,j
eps
NaN
ans
Instrucciones para desplegar los string que estan junto a la estrellita rosa.
plt.ylabel('Month Number')
plt.xlabel('Sales units in number')
plt.title('Month Number')
plt.title('Sales units in number'')
plt.xlabel('Month Number')
plt.ylabel('Sales units in number')
plt.label('Month Number')
plt.label('Sales units in number')
¿Función que si no la añadimos en el programa no muestra la gráfica?
plt.bar(list_m, list_p)
plt.show()
plt.plot(list_m, list_p)
Instrucciones para desplegar los string que esta marcado en la parte superior de la gráfica
plt.xlabel('bathingsoap sales data')
plt.ylabel('bathingsoap sales data')
plt.title('bathingsoap sales data')
plt.legend('bathingsoap sales data')
Create a matrix of 3x3 random numbers, called R
(Uniformly distributed numbers between 0 and 1)
(a)
What will be the output on executing this program?
What will be the output on executing this program?
A software tool used for data analysis and interfaces.
Robot Operating System
Python
C++
Matlab
The Arduino microcontroller uses a programming language based on _____.
C
Phython
ROS
Matlab
the output line will be ?
How to plot a graph in MATLAB
x : [value ofarray]
y : [value ofarray] plot(x, y)
x : [value ofarray];
y : [value ofarray]; plot(x, y)
x=[value ofarray];
y=[value ofarray]; plot(x, y)
x : [value ofarray]
y : [value ofarray] plot(x, y);
WHAT ARE THE SPECIAL MATRIX IN MATLAB
HILBERT MATRIX
HILBERT INVERSE MATRIX
PASCAL MATRIX
SQUARE MAGIC
TOEPLITZ MATRIX
VANDERMONDE MATRIX
EIGEN VALUE TEST MATRIX
SQUARE MATRIX
SOLVE('4-t^2=0')
(a)
A= 1 2 3
4 5 6
7 8 9
>>A(:,2)=[]
1 3
4 6
7 0
2 3
5 6
8 9
1 3
4 6
7 9
2 3
5 6
8 0
Command is used to save command window text to file
a) saveas
texttofile
diary
todiary
a = 1; sin(a) a = 2;
0.4815
0.8516
0.8415
0.4916
OUTPUT OF A = [0 1; 1 0] ; B=2 ; C = A + B
1 2
4 5
1 4
2 5
ERROR
1 2
5 4
What happens if we don’t assign a variable to an expression which evaluates a numerical value?
MATLAB shows error
values are assigned to a variable ans automatically
Depends on the numerical value
Nothing happens
What is the disadvantage of the whos function in MATLAB?
It does not show the name of the variable
It does not show the class of the variable
It does not show the size of the variable
It does not show the values of the variable
Vectors depend upon brackets while scalars don’t
TRUE
FALSE
OUTPUT OF A=[1 2 3..
];
1 2 3
A row vector concatenated with a null matrix
Error
The output is suppressed
Variables need to have same name while being passed from the primary function to the sub-function
TRUE
FALSE
FIND THE ERROR x=-10:1:10; y=-10:2:10; plot(x,y)
Length of x and y should be same
No error
Plot is not available in MATLAB
Plot x,y has no semicolon
What does the echo command do?
It shows the comments present in Script files
It shows the commands and comments in MAT-files
It echoes
It shows the commands and the comments in M-files
Marca el error de la secuencia:
100 , 90 , 80 , 76 , 60 , 50 , 40 , 30 , 20 , 10.
76
60
1
10
Marca el error o los errores
20 , 24 , 28, 30 , 36 , 40 , 42 , 48.
20, 42
30
30, 42
42
Marca el error o los errores.
63 , 67 , 71, 75 , 80 , 83 , 87.
80
80,87
75
83
Marca el error o los errores
2 , 4 , 6 , 8, 10, 13, 14 , 16
16
12
13
2
Marca el error
20 , 40 , 60 , 80, 100, 120, 150 , 160
60
130
120
150
Marca el error.
35, 40, 45, 50, 55, 60, 65, 70, 80
35
80
45
50
Instrucción para abrir y cargar todos los datos en un data frame dt- desde archivo tacos.csv
df = pd.read_csv("tacos.csv")
df = pd.read_csv(tacos.csv)
pd.read_csv("tacos.csv")
pd.read_csv(tacos.csv)
Instrucción para crear la lista con los datos de la columna total_profit
profit=df[ total_profit ]
df['total_profit']
df[ total_profit ]
profit=df[ 'total_profit' ]
Instrucción para mostrar una gráfica de líneas -de las ganancias de cada mes.
list_p = df ['total_profit']
list_m = df['month_number']
plt.plot(list_m, list_p)
plt.plot(list_p, list_m)
plt.plot [ list_m , list_p]
plt.plot[list_p, list_m]
Instrucciones para desplegar los string que estan junto a la estrellita rosa.
plt.ylabel('Month Number')
plt.xlabel('Sales units in number')
plt.title('Month Number')
plt.title('Sales units in number'')
plt.xlabel('Month Number')
plt.ylabel('Sales units in number')
plt.label('Month Number')
plt.label('Sales units in number')
¿Función que si no la añadimos en el programa no muestra la gráfica?
plt.bar(list_m, list_p)
plt.show()
plt.plot(list_m, list_p)
¿Función para dibujar una gráfica de líneas?
plt.bar(list_m, list_p)
plt.line(list_m, list_p)
plt.plot(list_m, list_p)
¿Función para dibujar una gráfica de barras?
plt.bar(monthList, list_p)
plt.line(monthList, list_p)
plt.plot(monthList, list_p)
plt.plot(monthList, faceCremSalesData, label = 'Face cream Sales Data', marker='o',markerfacecolor='b')
¿qué función tiene label = 'Face cream Sales Data'?
string que se mostrará al ejecutar plt.legend( ) para identificar la gráfica
string que se mostrará al ejecutar plt.xlabel( )
string que se mostrará al ejecutar plt.ylabel( )
string que se mostrará al ejecutar plt.title( )
Instrucciones para desplegar los string que esta marcado en la parte superior de la gráfica
plt.xlabel('bathingsoap sales data')
plt.ylabel('bathingsoap sales data')
plt.title('bathingsoap sales data')
plt.legend('bathingsoap sales data')
plt.plot(monthList, faceCremSalesData, label = 'Face cream Sales Data', marker='d',markerfacecolor='b')
¿qué función tiene marker='d'?
dibuja un diamante en cada valor de x
dibuja una estrella en cada valor de x
dibuja un triangulo con la punta hacia abajo en cada valor de x
dibuja una cubo en cada valor de x
