Deck 15: Computational Engineering Tools: Matlab

ملء الشاشة (f)
exit full mode
سؤال
If you define x = 2/3, and then type format bank, how will the value of x be displayed?

A)x = 0.66666666667
B)x = 0.6667
C)x = 0.67
D)x = 2/3
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
If you define x = 2/3, and then type format long, how will the value of x be displayed?

A)x = 0.66666666666666666666667
B)x = 0.66666666666667
C)x = 0.67000000000000
D)x = 2/3
سؤال
To clear the contents of the Command Window, type

A)clear
B)clr
C)clc
D)shift-c
سؤال
To generate the set of x even numbers in the range of two to twenty, what should you enter in the Command Window?

A)x = 2;2;20
B)x = 2:2:20
C)x = 2:20:2
D)x = 2,20,2
سؤال
Shown below are MATLAB inputs.Complete each output:
>> E = [10:-2:0];
>> F = 20./E
>> F =
سؤال
Shown below are MATLAB inputs.Complete each output:
>> A = [1:4];
>> B = 3.*A
>> B =
سؤال
In the MATLAB environment, you can assign values to a variable or define the elements of a matrix.
سؤال
The following matrices have already been defined in MATLAB: The following matrices have already been defined in MATLAB:   What would be the outputs of the following MATLAB inputs: >> A(4:8)<div style=padding-top: 35px> What would be the outputs of the following MATLAB inputs:
>> A(4:8)
سؤال
Shown below are MATLAB inputs.Complete each output:
>> A = [2:5];
>> B = 4*A
>> B =
سؤال
If you define x = 2/3, and then type format rat, how will the value of x be displayed?

A)x = 0.66666666667
B)x = 0.6667
C)x = 0.67
D)x = 2/3
سؤال
If you define x = 2/3, and then type format short, how will the value of x be displayed?

A)x = 0.66666666667
B)x = 0.6667
C)x = 0.67
D)x = 2/3
سؤال
The part of the screen where you enter variables and issue MATLAB commands is known as the

A)menu bar.
B)current folder.
C)command window.
D)command history window.
سؤال
Engineers can use MATLAB to solve a wide range of engineering problems.They take advantage of built-in functions of the software and also they can write their own programs in MATLAB.
سؤال
Shown below are MATLAB inputs.Complete each output:
>> C = [1,3,-2,0];
>> D = 3./C
>> D =
سؤال
In MATLAB, the elements of the matrix are enclosed in brackets [ ] and are separated by blank space, and the elements of each row are separated by a semicolon (;)
سؤال
In MATLAB, you cannot transfer old commands from the Command History Window to the Command Window.
سؤال
Suppose you have defined x = [1,2,3] and y = [2,4,6] in the Command Window.Determine the result of the following MATLAB operation: >>x + y

A)ans = 3 6 9
B)ans = 1 2 3 2 4 6
C)ans = 6 12
D)ans = 18
سؤال
The following matrices have already been defined in MATLAB: The following matrices have already been defined in MATLAB:   What would be the outputs of the following MATLAB inputs: >> B(2:5)<div style=padding-top: 35px> What would be the outputs of the following MATLAB inputs:
>> B(2:5)
سؤال
Suppose you have defined x = [1,2,3] and y = [2,4,6] in the Command Window.Determine the result of the following MATLAB operation: >>x .* y

A)ans = 3 6 9
B)ans = 1 2 3 2 4 6
B)ans = 2 8 18
C)ans = 6 12
سؤال
Shown below are MATLAB inputs.Complete each output:
>> A = [2:5];
>> B = 4.*A
>> B =
سؤال
The following matrices have already been defined in MATLAB: The following matrices have already been defined in MATLAB:   What would be the outputs of the following MATLAB inputs: >> A(2:3,:)<div style=padding-top: 35px> What would be the outputs of the following MATLAB inputs:
>> A(2:3,:)
سؤال
What does the following MATLAB function do? log2(x)

A)returns the value of base-2 logarithm of x.
B)returns the value of base-10 logarithm of 2 and assigns it to x.
C)returns the value of common log of 2x.
D)returns the value of natural logarithm of 2 and assigns it to x.
سؤال
The following matrices have already been defined in MATLAB: The following matrices have already been defined in MATLAB:   What would be the outputs of the following MATLAB inputs: >> length (A)<div style=padding-top: 35px> What would be the outputs of the following MATLAB inputs:
>> length (A)
سؤال
To obtain the coefficients of the second order polynomial that best fits a given set of x and y data, you will type the following sequence of commands:

A)Coefficients = polyfit(2, x,y)
B)Coefficients = polyfit(x,2,y)
C)Coefficients = polyfit(x,y,2)
D)none of the above
سؤال
The following matrices have already been defined in MATLAB: The following matrices have already been defined in MATLAB:   What would be the outputs of the following MATLAB inputs: >> A(:,3)<div style=padding-top: 35px> What would be the outputs of the following MATLAB inputs:
>> A(:,3)
سؤال
Find the corresponding MATLAB output:
>> factorial(3)
ans =
سؤال
Which of the following commands are commonly used while plotting in MATLAB?

A)plot
B)title
C)grid
D)all of the above
سؤال
The following matrices have already been defined in MATLAB: The following matrices have already been defined in MATLAB:   What would be the outputs of the following MATLAB inputs: >> B(:,3:4)<div style=padding-top: 35px> What would be the outputs of the following MATLAB inputs:
>> B(:,3:4)
سؤال
In the MATLAB Command Window, if you type the following commands, what would be the result?
scores = [80 90 50 70 80 60 65 95 70 40];
for i=1:1:10
if scores (i) >60
fprintf('\t %g \t\t\t\t\t PASSING\n', scores (i));
else
fprintf('\t %g \t\t\t\t\t FAILING\n', scores (i))
end
end
سؤال
In the MATLAB Command Window, if you type the following commands, what would be the result?
scores = [80 90 50 70 80 60 65 95 70 40];
for i=1:1:10
if scores (i) <60
fprintf ('\t %g \t\t\t\t\t FAILING\n', scores (i))
end
end
سؤال
The following matrices have already been defined in MATLAB: The following matrices have already been defined in MATLAB:   What would be the outputs of the following MATLAB inputs: >> B(2:3, 2:4)<div style=padding-top: 35px> What would be the outputs of the following MATLAB inputs:
>> B(2:3, 2:4)
سؤال
an M-file is used to when you write a program that is more than a few lines long.
سؤال
Which of the following MATLAB commands would calculate the value of ex?

A)e^x
B)exp(x)
C)exp^x
D)exponent(x)
سؤال
The following matrices have already been defined in MATLAB: The following matrices have already been defined in MATLAB:   What would be the outputs of the following MATLAB inputs: >> max(B)<div style=padding-top: 35px> What would be the outputs of the following MATLAB inputs:
>> max(B)
سؤال
What is the MATLAB command for calculating the square root of a number?

A)square_root
B)sqrt
C)sqr
D)sq_rt
سؤال
The following matrices have already been defined in MATLAB: The following matrices have already been defined in MATLAB:   What would be the outputs of the following MATLAB inputs: >> min(A)<div style=padding-top: 35px> What would be the outputs of the following MATLAB inputs:
>> min(A)
سؤال
Find the corresponding MATLAB output:
>> A = [2,3,4,5;1,-3,-7,4;2,3,2,1];
>> max (A)
ans =
سؤال
What would be the result of the following MATLAB commands?
F1x = sym('x^2-25');
solve(F1x)
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/38
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 15: Computational Engineering Tools: Matlab
1
If you define x = 2/3, and then type format bank, how will the value of x be displayed?

A)x = 0.66666666667
B)x = 0.6667
C)x = 0.67
D)x = 2/3
C
2
If you define x = 2/3, and then type format long, how will the value of x be displayed?

A)x = 0.66666666666666666666667
B)x = 0.66666666666667
C)x = 0.67000000000000
D)x = 2/3
B
3
To clear the contents of the Command Window, type

A)clear
B)clr
C)clc
D)shift-c
C
4
To generate the set of x even numbers in the range of two to twenty, what should you enter in the Command Window?

A)x = 2;2;20
B)x = 2:2:20
C)x = 2:20:2
D)x = 2,20,2
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 38 في هذه المجموعة.
فتح الحزمة
k this deck
5
Shown below are MATLAB inputs.Complete each output:
>> E = [10:-2:0];
>> F = 20./E
>> F =
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 38 في هذه المجموعة.
فتح الحزمة
k this deck
6
Shown below are MATLAB inputs.Complete each output:
>> A = [1:4];
>> B = 3.*A
>> B =
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 38 في هذه المجموعة.
فتح الحزمة
k this deck
7
In the MATLAB environment, you can assign values to a variable or define the elements of a matrix.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 38 في هذه المجموعة.
فتح الحزمة
k this deck
8
The following matrices have already been defined in MATLAB: The following matrices have already been defined in MATLAB:   What would be the outputs of the following MATLAB inputs: >> A(4:8) What would be the outputs of the following MATLAB inputs:
>> A(4:8)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 38 في هذه المجموعة.
فتح الحزمة
k this deck
9
Shown below are MATLAB inputs.Complete each output:
>> A = [2:5];
>> B = 4*A
>> B =
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 38 في هذه المجموعة.
فتح الحزمة
k this deck
10
If you define x = 2/3, and then type format rat, how will the value of x be displayed?

A)x = 0.66666666667
B)x = 0.6667
C)x = 0.67
D)x = 2/3
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 38 في هذه المجموعة.
فتح الحزمة
k this deck
11
If you define x = 2/3, and then type format short, how will the value of x be displayed?

A)x = 0.66666666667
B)x = 0.6667
C)x = 0.67
D)x = 2/3
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 38 في هذه المجموعة.
فتح الحزمة
k this deck
12
The part of the screen where you enter variables and issue MATLAB commands is known as the

A)menu bar.
B)current folder.
C)command window.
D)command history window.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 38 في هذه المجموعة.
فتح الحزمة
k this deck
13
Engineers can use MATLAB to solve a wide range of engineering problems.They take advantage of built-in functions of the software and also they can write their own programs in MATLAB.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 38 في هذه المجموعة.
فتح الحزمة
k this deck
14
Shown below are MATLAB inputs.Complete each output:
>> C = [1,3,-2,0];
>> D = 3./C
>> D =
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 38 في هذه المجموعة.
فتح الحزمة
k this deck
15
In MATLAB, the elements of the matrix are enclosed in brackets [ ] and are separated by blank space, and the elements of each row are separated by a semicolon (;)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 38 في هذه المجموعة.
فتح الحزمة
k this deck
16
In MATLAB, you cannot transfer old commands from the Command History Window to the Command Window.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 38 في هذه المجموعة.
فتح الحزمة
k this deck
17
Suppose you have defined x = [1,2,3] and y = [2,4,6] in the Command Window.Determine the result of the following MATLAB operation: >>x + y

A)ans = 3 6 9
B)ans = 1 2 3 2 4 6
C)ans = 6 12
D)ans = 18
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 38 في هذه المجموعة.
فتح الحزمة
k this deck
18
The following matrices have already been defined in MATLAB: The following matrices have already been defined in MATLAB:   What would be the outputs of the following MATLAB inputs: >> B(2:5) What would be the outputs of the following MATLAB inputs:
>> B(2:5)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 38 في هذه المجموعة.
فتح الحزمة
k this deck
19
Suppose you have defined x = [1,2,3] and y = [2,4,6] in the Command Window.Determine the result of the following MATLAB operation: >>x .* y

A)ans = 3 6 9
B)ans = 1 2 3 2 4 6
B)ans = 2 8 18
C)ans = 6 12
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 38 في هذه المجموعة.
فتح الحزمة
k this deck
20
Shown below are MATLAB inputs.Complete each output:
>> A = [2:5];
>> B = 4.*A
>> B =
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 38 في هذه المجموعة.
فتح الحزمة
k this deck
21
The following matrices have already been defined in MATLAB: The following matrices have already been defined in MATLAB:   What would be the outputs of the following MATLAB inputs: >> A(2:3,:) What would be the outputs of the following MATLAB inputs:
>> A(2:3,:)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 38 في هذه المجموعة.
فتح الحزمة
k this deck
22
What does the following MATLAB function do? log2(x)

A)returns the value of base-2 logarithm of x.
B)returns the value of base-10 logarithm of 2 and assigns it to x.
C)returns the value of common log of 2x.
D)returns the value of natural logarithm of 2 and assigns it to x.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 38 في هذه المجموعة.
فتح الحزمة
k this deck
23
The following matrices have already been defined in MATLAB: The following matrices have already been defined in MATLAB:   What would be the outputs of the following MATLAB inputs: >> length (A) What would be the outputs of the following MATLAB inputs:
>> length (A)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 38 في هذه المجموعة.
فتح الحزمة
k this deck
24
To obtain the coefficients of the second order polynomial that best fits a given set of x and y data, you will type the following sequence of commands:

A)Coefficients = polyfit(2, x,y)
B)Coefficients = polyfit(x,2,y)
C)Coefficients = polyfit(x,y,2)
D)none of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 38 في هذه المجموعة.
فتح الحزمة
k this deck
25
The following matrices have already been defined in MATLAB: The following matrices have already been defined in MATLAB:   What would be the outputs of the following MATLAB inputs: >> A(:,3) What would be the outputs of the following MATLAB inputs:
>> A(:,3)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 38 في هذه المجموعة.
فتح الحزمة
k this deck
26
Find the corresponding MATLAB output:
>> factorial(3)
ans =
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 38 في هذه المجموعة.
فتح الحزمة
k this deck
27
Which of the following commands are commonly used while plotting in MATLAB?

A)plot
B)title
C)grid
D)all of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 38 في هذه المجموعة.
فتح الحزمة
k this deck
28
The following matrices have already been defined in MATLAB: The following matrices have already been defined in MATLAB:   What would be the outputs of the following MATLAB inputs: >> B(:,3:4) What would be the outputs of the following MATLAB inputs:
>> B(:,3:4)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 38 في هذه المجموعة.
فتح الحزمة
k this deck
29
In the MATLAB Command Window, if you type the following commands, what would be the result?
scores = [80 90 50 70 80 60 65 95 70 40];
for i=1:1:10
if scores (i) >60
fprintf('\t %g \t\t\t\t\t PASSING\n', scores (i));
else
fprintf('\t %g \t\t\t\t\t FAILING\n', scores (i))
end
end
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 38 في هذه المجموعة.
فتح الحزمة
k this deck
30
In the MATLAB Command Window, if you type the following commands, what would be the result?
scores = [80 90 50 70 80 60 65 95 70 40];
for i=1:1:10
if scores (i) <60
fprintf ('\t %g \t\t\t\t\t FAILING\n', scores (i))
end
end
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 38 في هذه المجموعة.
فتح الحزمة
k this deck
31
The following matrices have already been defined in MATLAB: The following matrices have already been defined in MATLAB:   What would be the outputs of the following MATLAB inputs: >> B(2:3, 2:4) What would be the outputs of the following MATLAB inputs:
>> B(2:3, 2:4)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 38 في هذه المجموعة.
فتح الحزمة
k this deck
32
an M-file is used to when you write a program that is more than a few lines long.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 38 في هذه المجموعة.
فتح الحزمة
k this deck
33
Which of the following MATLAB commands would calculate the value of ex?

A)e^x
B)exp(x)
C)exp^x
D)exponent(x)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 38 في هذه المجموعة.
فتح الحزمة
k this deck
34
The following matrices have already been defined in MATLAB: The following matrices have already been defined in MATLAB:   What would be the outputs of the following MATLAB inputs: >> max(B) What would be the outputs of the following MATLAB inputs:
>> max(B)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 38 في هذه المجموعة.
فتح الحزمة
k this deck
35
What is the MATLAB command for calculating the square root of a number?

A)square_root
B)sqrt
C)sqr
D)sq_rt
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 38 في هذه المجموعة.
فتح الحزمة
k this deck
36
The following matrices have already been defined in MATLAB: The following matrices have already been defined in MATLAB:   What would be the outputs of the following MATLAB inputs: >> min(A) What would be the outputs of the following MATLAB inputs:
>> min(A)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 38 في هذه المجموعة.
فتح الحزمة
k this deck
37
Find the corresponding MATLAB output:
>> A = [2,3,4,5;1,-3,-7,4;2,3,2,1];
>> max (A)
ans =
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 38 في هذه المجموعة.
فتح الحزمة
k this deck
38
What would be the result of the following MATLAB commands?
F1x = sym('x^2-25');
solve(F1x)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 38 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 38 في هذه المجموعة.