MATLAB Flashcards
what does matlab stand for?
matrix labratory
what must you create if you want to create a command sequence?
you must create a script or M-file
what does “clc” stand for?
clear all commands
What does MATLAB consider all numbers as?
floating point numbers
what does the “whos” command do?
tells you what variables have been defined in the workspace
when matlab accesses or stores information, what window does it use?
the current folder is used
T/F, can matlab variables have the same name as built in functions?
true
what does the “which” command do?
it allows you to check whether or not your variable name is the same as a built in matlab function
Does matlab read white space?
no
define exponent overflow
exponent overflow is when a number is above the MATLAB data range
what does a variable that is above the acceptable matlab data range appear as?
inf
define exponent underflow
exponent underflow occurs when a number is divided by zero
3/0 will return what?
inf
name how to use the linspace() command
(initial value, final value, number of values you want)
what does the linspace() command do?
the command returns a specified quantity of numbers evenly spaced between the initial and final values specified in the command
How does matlab process a matrix that is being called with numbers?
as a single column matrix where the numbers represent different elements
in matlab, is it valid to have a matrix that is empty?
yes it is valid to have an empty matrix
what should you look out for when expressing a variable in scientific notation with matlab?
it is important to omit blanks between the mantissa and the exponent
what is “6.02 e23” read as in matlab
6.02 and 10^23
what does “format long” do?
shows 14 points past the decimal
how does matlab print integers?
as integers
what does “format short” do?
shows 4 decimal points
what does “format bank” do?
shows 2 decimal points
does changing your display affect your data values?
no, matlab does its calculations with double point precision
how does matlab print numbers that are too large for its default format?
in scientific notation
what does “format long e” do?
it formats all numbers in scientific notation
what does “format +” do?
displays an array’s elements as “+” or “-“ based on whether or not they are positive or negative
what does the disp() function display?
it displays a number without its variable
what is the print format in matlab?
fprintf(‘text’ , variables, … )
what does the width field control in matlab?
the number of characters to be printed