WITH ANSWERS SOLVED.
- 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) -
CORRECT ANSWER✅✅Creating a matrix can be done in several ways:
- 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) -
CORRECT ANSWER✅✅Creating a vector can be done in several ways:
- 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 - CORRECT ANSWER✅✅Rules about variable names:
- Output commands to display text messages
- Formatting commands of plots
- Input arguments of some functions - CORRECT ANSWER✅✅Use of strings in
MATLAB:
(&,|,~) - CORRECT ANSWER✅✅Logical Operators
(+,-,*,\,/) - CORRECT ANSWER✅✅Order of Precedence (Arithmetic):
(v0): hmax(v0) = v0^2/(2*g), g = 9.81 m/s2 - CORRECT ANSWER✅✅A simple
example of User-Defined Functions:
• Data should usually be stored in their
smallest parts.
• Avoid redundancy.
• Avoid tables with intentionally blank entries.
• Strive for table cohesion.
• Avoid fields whose values can be calculated from existing fields. - CORRECT
ANSWER✅✅Principles of Database Design:
• Power function: p = polyfit(log(x),log(y),1)
• Exponential function: p = polyfit(x,log(y),1)
, or p = polyfit(x,log10(y),1)
• Logarithmic function: p = polyfit(log(x),y,1)
or p = polyfit(log10(x),y,1)
• Reciprocal function: p = polyfit(x,1./y,1) - CORRECT ANSWER✅✅Examples of Curve
fitting functions for MATLAB:
• Sorts string values into alphabetical
order (either ascending or descending)
• Sorts numbers into numeric order (either ascending or descending) - CORRECT
ANSWER✅✅The orderly Operator
• Vector:v(:);v(m:n)
• Matrix:A(:,n);A(n,:);A(:,m:n);A(m:n,:);A(m:n,p:q) - CORRECT ANSWER✅✅Using a
colon to address a range of elements in vector or matrix
1) using a function handle, 2) typing the name of the function that is being passed in as
a string expression - CORRECT ANSWER✅✅Two methods to list the name of an
imported function in the argument list of a function function:
a function file - CORRECT ANSWER✅✅Similar to a script file, _____ must be saved
before it can be used
Access, Oracle, SQL Server - CORRECT ANSWER✅✅Examples of DBMS
An array - CORRECT ANSWER✅✅a list of numbers arranged in rows and/or columns
Array - CORRECT ANSWER✅✅a fundamental form that MATLAB uses to store and
manipulate data
Basic fitting interface: - CORRECT ANSWER✅✅What is a tool that can be used to
perform curve fitting and interpolation interactively
before - CORRECT ANSWER✅✅The global command must appear _____ the
variable is used, preferably at the top of the file
Break Command - CORRECT ANSWER✅✅Both loops (for-end & while-end) can be
terminated ahead of time with what command:
Break Command - CORRECT ANSWER✅✅It's usually used within a conditional
statement:
Break command - CORRECT ANSWER✅✅The _____ can terminate the execution of
a loop. However if it's inside a nested loop, only the nested loop is terminated.