Table - ANSWERA rectangular array of data
script file - ANSWERa sequence of MATLAB commands also called
program (also called M-files)
- Must begin with a letter
- Can be up to 63 characters long (31 in MATLAB 6)
- Can contain letters, digits, and the underscore characters - MATLAB is case sensitive
- No space is allowed
- No use of built-in functions - ANSWERRules about variable names:
Array - ANSWERa fundamental form that MATLAB uses to store and manipulate data
An array - ANSWERa list of numbers arranged in rows and/or columns
characters (strings) - ANSWERIn addition to arrays of numbers, arrays in MATLAB can
be made of a list of
True - ANSWERTables can be usually converted to arrays
True - ANSWERIn MATLAB a vector is created by assigning the elements of the vector
to a variable
- By known list of numbers (row, column) or functions
- By specifying the first, the spacing, and the last term (with or without brackets, forward
and backward)
- By specifying the first and last terms, and the number of terms (linspace command) -
ANSWERCreating a vector can be done in several ways:
False - ANSWERThe rule in creating a matrix is that some of the rows must have the
same number of elements
- By known list of numbers (row, column) or functions
- By specifying the first, the spacing, and the last term
- By specifying the first and last terms, and the number of terms (linspace command) -
ANSWERCreating a matrix can be done in several ways:
False - ANSWERNot all variables in MATLAB are arrays
• Vector:v(:);v(m:n)
• Matrix:A(:,n);A(n,:);A(:,m:n);A(m:n,:);A(m:n,p:q) - ANSWERUsing a colon to address a
range of elements in vector or matrix
, True - ANSWERAdding an element which is beyond the size of a matrix, similar as in
vector case, will result in added zeros
length(A), size(A), reshape(A, m, n), diag(v), diag(A) - ANSWERBuilt-in functions for
handling arrays
String - ANSWERan array of characters
True - ANSWERStrings use single quotes, and can include letters, digits, other symbols
and space in MATLAB
- Output commands to display text messages
- Formatting commands of plots
- Input arguments of some functions - ANSWERUse of strings in MATLAB:
True - ANSWERWe can modify a string, by accessing one character or a set of
characters within the original string
False - ANSWERStrings can't be stored in a matrix
True - ANSWERStrings can also be stored in a matrix
Info = char('Student Name:','John Smith','Grade:','A') - ANSWERBuilt-infunction char:
False - ANSWERA string made up of the digits is the same as the number itself
True - ANSWERA string made up of the digits is different than the number itself
field - ANSWEREach column of the table, called a _____ contains the same type of
information
record - ANSWEREach row, called a _____, contains all the information about one
entry in the table
true - ANSWERDatabases contain one or more related tables
Access, Oracle, SQL Server - ANSWERExamples of DBMS
var cntInfo =
from item in megacitiesDataSet.Countries where item.name == textBox1.Text
let cName = item.name
let cPop = item.pop2010
let cCurr = item.monetaryUnit
select new { cName, cPop, cCurr };
if (cntInfo.Count() == 1)
dataGridView1.DataSource = cntInfo.ToList();