MATLAB EXTRA 1

studied byStudied by 0 people
0.0(0)
learn
LearnA personalized and smart learning plan
exam
Practice TestTake a test on your terms and definitions
spaced repetition
Spaced RepetitionScientifically backed study method
heart puzzle
Matching GameHow quick can you match all your cards?
flashcards
FlashcardsStudy terms and definitions

1 / 64

encourage image

There's no tags or description

Looks like no one added any tags here yet for you.

65 Terms

1

What will be the output of the code all

([1 0 1 0])?

0

New cards
2

What is the output of the code 2 * 0 ^ 0 + 9?

11

New cards
3

What will be the output of the code Inf (74 & sin(nan))?

error

New cards
4

What will be the output of the code all([NaN])?

error

New cards
5

What will be the output of the code xor(3476, 1234)?

1

New cards
6

What will be the output of the code any(sin(0), NaN)?

1

New cards
7

What will be the output of the code all(sin([pi]))?

1

New cards
8

The correct hierarchy of operation is:

>>=&1

New cards
9

Predominantly, what are the two kinds of errors in MATLAB programs?

syntax and runtime

New cards
10

Which code would you use to find the value of the function f(x) = sin(x) + cos(x) + tan(x) at x = 1?

sin(45) + cos(d45) + tand(45)

New cards
11

What command in MATLAB is used to create new variable?

var

New cards
12

The num2str command means

converts a number to string

New cards
13

To display ‘Question 2’ in command window, the correct command is

disp (‘Question 2’)

New cards
14

To add comment to the mfile, the MATLAB command

%

New cards
15

What is the name of a primary function?

Name of M.file

New cards
16

What are persistent variables?

variables which retain values between calls to the function

New cards
17

Which command can be used for single step execution in debugging mode?

dbstep

New cards
18

How do we access a global variable in nested functions?

declare the variable as global

New cards
19

How does MATLAB help in passing function arguments?

by call by value and call by reference

New cards
20

What is the default variable while evaluating transfer function?

s

New cards
21

What is the default variable while evaluating Laplace transform?

s.

New cards
22

The output of the following code is
laplace(exp(-3*p))

error due to p

New cards
23

The output of the following code is
solve('w+z=0')

-z

New cards
24

The default variable in case of solve (‘f(x,y,p,a,l)’ ) command is

x

New cards
25

What is the default parameter for dsolve() command

input differentiating variable

New cards
26

What is the default parameter for the ‘ztrans()’ command

z

New cards
27

What is the output of the following code? syms x; laplace(exp(-3x),x,y)

error

New cards
28

Matlab allows modeling of different control systems using

simulink

New cards
29

How to stop the execution of a chain of commands

press ctrl + c

New cards
30

What are MEX files in MATLAB?

Allows the user to combine C source files with MATLAB

New cards
31

How would you plot multiple graphs in MATLAB?

using the held function

New cards
32

How do you show the program of a MAT file

the program cannot be shown while running a MEX file

New cards
33

What is the equipment of subplot (1,1,1)?

axes

New cards
34

The command used to reflect film from disk into the workspace is

load

New cards
35

The format for 5 digit representation along with exponent is

short -e

New cards
36

Which operator in c used to prevent the printing of insignificant terms?

%g

New cards
37

The function to plot a graph with both axes logarithmic scale is

loglog

New cards
38

We can plot a discrete and continuous relationship in the same graph

false

New cards
39

it not possible to store graph as MAT file

New cards
40

How do we break from an infinite loop without keeping a break statement within the loop?

press Ctrl + C

New cards
41

The nature of complex input taken by the sparse() command is

sparse

New cards
42

What is the attribute of sparse matrix?

imaginary & real part

New cards
43

which of the following can be the space taken up by sparse matrix

25 MB

New cards
44

A sparse identity matrix is generated by which command?

speye

New cards
45

Which command is used to generate a sparse normally generated matrix?

sprandn

New cards
46

What is the output of the following code?

New cards
47

The non-zero elements in sparse matrix are shown by which command?

New cards
48

What is the output of the following code?
A = [0 Inf Inf 0 0; 2 9 7 0; sin (Inf) 8 0 0];
P = sparse (A); nnz (P)

Imemory > amemory

New cards
49

The size of the sparse matrix will be ____ the original matrix.

equal

New cards
50

The maximum space allocated for sparse matrix is given by which command?

nzmax

New cards
51

Which matrix has most of the elements (not all) as zero.

sparse matrix

New cards
52

What is the relation between Sparsity and Density of a matrix?

Sparsity = 1 - Density

New cards
53

Who coined the term Sparse Matrix?

Harry Markowitz

New cards
54

The matrix contains in rows and n columns. The matrix is called Sparse matrix if

Total No. of Zero elements > (m*n)/z

New cards
55

Which of the following is not the method to represent Sparse matrix?

heap

New cards
56

Is Sparse matrix also known as Dense matrix?

false

New cards
57

Which one of the following is a Special Sparse matrix?

band matrix

New cards
58

in what way the Symmetry Sparse matrix can be stored efficiently?

binary tree

New cards
59

The output of the following command is


a = [123; 400; 309]; spy(A)

New cards
60

Executing in the command window the following code returns
a = [1:3]; size(a)

3 1

New cards
61

Command used to save command window text to file

diary

New cards
62

Executing in the editor window the following code returns
a = 1; sin(a)

0.8415

New cards
63

Which is invalid variable name in MATLAB?

6x

New cards
64

Command used to display the value of variable x

disp(x)

New cards
65

What command is used to clear a command window

clc

New cards
robot