Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
74 views

MATLAB Terms

This document provides information about various Matlab commands and concepts. Matlab stands for Matrix Laboratory (% is the comment symbol). Predefined variables do not include Gravity. The Clear command clears variables from memory. Character values are represented by their ASCII values. Delayed copy is used to manage memory in Matlab. The \n escape character prints a newline. The continue keyword moves to the next loop iteration. syms defines symbolic variables. v(1) accesses the first element of vector v. == compares elements for equality. Size returns the number of rows and columns of a matrix. isnumeric(32) returns 1. sprintf saves a formatted string without printing. %g is the default number format in fprintf.

Uploaded by

Jumer Beup
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
74 views

MATLAB Terms

This document provides information about various Matlab commands and concepts. Matlab stands for Matrix Laboratory (% is the comment symbol). Predefined variables do not include Gravity. The Clear command clears variables from memory. Character values are represented by their ASCII values. Delayed copy is used to manage memory in Matlab. The \n escape character prints a newline. The continue keyword moves to the next loop iteration. syms defines symbolic variables. v(1) accesses the first element of vector v. == compares elements for equality. Size returns the number of rows and columns of a matrix. isnumeric(32) returns 1. sprintf saves a formatted string without printing. %g is the default number format in fprintf.

Uploaded by

Jumer Beup
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

What does Matlab stand for?

Matrix laboratory

What symbol precedes all comments in Matlab?


“ % // None of the above

Which of the following is not a pre-defined variable in Matlab


Gravity

This Matlab command clears all data and variables stored in memory
Clear

Characters in Matlab are represented in their value in memory


ASCII

Which is these is not an aspect of a for/while loop


Runner

To better manage memory and prevent unnecessary memory allocations, Matlab uses:
Delayed copy

To print a newline in a fprintf statement, you must use the following escape character l
\n

In Matlab, this keyword immediately moves to the next iteration of the loop
continue

Which of the following will correctly define x,y, and z as symbols?


syms x y z

Which of the these is the way to access the first element in a vector named v (assuming there is at
least one element in the vector)?
v(1)

Which of the following is used to see of two elements are equal in MATLAB?
==

If vector = [1 2 3 4; 11 24 92 100; 345 65 90 1]. What will the value of a be equal to if this code is
entered into Matlab >> [ a b ] = size (vector)?
3

What is the value of ans that is printed when the following code is run: isnumeric(32)
1
If I want to save a formatted string to memory, but don’t want to print it out, which command should I
use?
sprintf

When used in the fprintf, the %g is used as


Default number display

When used in the fprintf command, the \n is used to


Add a line space (enter key)

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


disp(‘Question 2’)

The clc command is used to


Clear the command window

The num2str command


Converts a number to string

The output of the last line is


aa=2
as=num2str(a2.
cat=[‘cat’ as]
cat2 cat 2 ??? Undefined function or variable ‘as’ cat aa

To join one or more strings into a single string is known as


Concatenation

The output of
cat=[‘cat’ ‘dog’]
is
catdog

Which functions help you to save and load variables?


>> save Lays a b
>> load (‘myfile.mat’)

To display comments of M-file, we use ______


echo on

Where do we need to store a function to call it in other programs?


The bin folder

What are the difference between the ‘help’ and the ‘look for’ command?
Help returns the entire set while look for returns specific commands
What will the following set of commands do when they are present in a script file?

stem[y1, y2];
title(‘p’)
print -deps l
Store the graph as a separate file

The function to close the windows containing graphs generated from MATLAB is
Close all

What is not displayed by the workspace?


Time of variable generation

MATLAB allows modelling of different control systems using ______


Simulink

How to stop the execution of a chain of commands?


Press ctrl + c

What are MEX files in MATLAB?


Allows the user to combine C source files with MATLAB files

Explain what is MATLAB? Where MATLAB may be applicable?


MATLAB is a high-level programming language with an interactive surroundings for visualization,
numerical computation and programming characteristic.

What does MATLAB consist of?


MATLAB includes five fundamental parts

Matlab language
Matlab running environment
Handle graphics
Matlab function library
Matlab application program interface (API)

To add a comment to the mfile, the Matlab command is


%

You might also like