







Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
A comprehensive list of matlab commands and concepts, covering various aspects of programming, data manipulation, visualization, and mathematical operations. It serves as a valuable resource for students learning matlab, offering definitions, explanations, and examples of key commands and concepts. Organized in a clear and concise manner, making it easy for students to navigate and understand the information.
Typology: Exams
1 / 13
This page cannot be seen from the preview
Don't miss anything!
.* - ANSElement-by-element array multiplication operator .^ - ANSElement-by-element array power operator
- ANSGreater than = - ANSGreater than or equal to | - ANSOr (used with vectors) || - ANSOr (used with scalars) ~ - ANSNot
~= - ANSNot equal to 0 (zero) is the typical computer science representation for true, while 1 (one) is the typical computer science representation for false. - ANSFalse A matrix with a determinant that is non-zero - ANSA matrix for which an inverse does not exist A stiff equation is a differential equation where some numerical solution approaches are numerically stable unless you use extremely small step sizes. - ANSFalse alpha( ) - ANSUsed to adjust the transparency of a graphics object An array cannot contain multiple pieces of information. - ANSFalse animatedline( ) - ANSCreates a line animation Annotation axes - ANSEnables one to insert annotation objects such as lines, legends, and text boxes onto a figure Arithmetic and Logic Unit (ALU) - ANSPerforms mathematical operations Array - ANSContainer for multiple pieces of orderly information At the end of a for loop, the loop index variable keeps its most recent value. - ANSTrue axis( ) - ANSUsed to control the axes of a plot Bit - ANSOne 0 or 1 break - ANSUsed to cause the termination of the smallest enclosing for loop or while loop break and continue are "go-to" techniques that all programmers should readily use. - ANSFalse Built-in backslash operator approach for solving systems of linear equations - ANSsolution = A\b Byte - ANSEight 0 or 1's camlight( ) - ANSUsed to adjust lighting Cell array constructors - ANSCurly braces: { and }
cputime( ) - ANSReturns the total central processing unit time used by MATLAB Cross product - ANSResult is orthogonal to the plane defined by the two input vectors Cross product operation - ANSc = cross(a, b) cumtrapz( ) - ANSCalculates the cumulative sum using the trapezoidal method Curve fitting - ANSConstructs a line of best fit for a data set diff( ) - ANSUsed for creating finite differences diff( ) - ANSUsed to calculate symbolic derivatives disp( ) - ANSUsed for printing output to the screen, but does not generally have formatting capabilities dlmwrite( ) - ANSUsed to write delimited output Dot product operation - ANSc = dot(a, b) Double - ANSIs stored using 64 bits dsolve( ) - ANSUsed to solve symbolic differential equations Edit text box - ANSUsed for acquiring input from the user Effective strategies for improving the performance of MATLAB computer code include: - ANS1. Only printing using print statements
Extrapolation - ANSConstructs estimated new data points beyond the range of a data set factor( ) - ANSFactors the expression false - ANSThe logical value 0 Field - ANSCan be thought of as a property fieldnames( ) - ANSAllows one to see the name of the fields figure( ) - ANSCalls a figure, creating it if necessary fimplicit( ) - ANSPlots implicit 2D plots Flowchart - ANSGrapgical representation of how code flows or progresses fmesh( ) - ANSPlots wireframe meshes fplot( ) - ANSPlots 2D plots fplot3( ) - ANSPlots 3D plots fprintf( ) - ANSUsed for printing output to the screen or to a file, and generally has formatting capabilities fsurf( ) - ANSPlots surface plots fzero( ) - ANSUsed for finding roots get( ) - ANSEnables one to acquire graphics object properties ginput( ) - ANSUsed to get data points from a plot gradient( ) - ANSUsed for creating finite differences Handle graphics - ANSThe components of the GUI are stored as properties relating to this idea horzcat( ) - ANSConcatenates horizontally How many counters can be used within a single program? - ANSAs many as the programmer would want or need imread( ) - ANSReads an image from a file
ln(x) - ANSNot a valid MATLAB command log(x) - ANSlog base e of x log10(x) - ANSlog base 10 of x loglog( ) - ANSPlots logarithm of y vs. logarithm of x Main Memory - ANSStores programs and program data into random access memory Mathematical function - ANSA mathematical relationship that maps an input to an output MATLAB array indexes must be positive integers. - ANSTrue MATLAB defaults to the behavior of hidden on unless hidden off is specified. - ANSTrue MATLAB function files are .m files like scripts are. - ANSTrue MATLAB generally interprets computer code line by line from the top to the bottom of a program. - ANSTrue MATLAB's desktop environment is an example of a GUI. - ANSTrue Matrix - ANS2D numeric array used in linear algebra with special mathematical properties Matrix inverse approach for solving systems of linear equations - ANSsolution = inv(A)*b Middle Riemann sum - ANSApproximates the function by its value at the middle point of the subinterval Most efficient approach computationally in MATLAB for solving systems of linear equations - ANSsolution = A\b nargin( ) - ANSDetermines the number of input arguments nargout( ) - ANSDetermines the number of output arguments Neglecting the possibility of else or elseif cases, a while loop can be thought of like a repetitious if statement. - ANSTrue Non-volatile Memory - ANSPermanant data storage num2str( ) - ANSConverts numbers to a character array
Numbers - ANSNumeric data numden( ) - ANSUsed to find the numerator and denominator of an expression Numerical differentation - ANSConstructs estimated derivative data for a data set Numerical differentiation tends to amplify the noise in one's data set. - ANSTrue ode113( ) - ANSA multi-step solver ode15i( ) - ANSUsed for solving implicit differential equations ode15s( ) - ANSGood for solving stiff differential equations and differential algebraic equations ode45( ) - ANSTypically your first choice solver unless you know something special about the ODE or ODE system One must use an even number of intervals when utilizing Simpson's rule. - ANSTrue orderfields( ) - ANSAllows one to reorder the fields Pass by reference - ANSA method for passing data to a function where memory address itself of a variable of interest is sent to the function Pass by value - ANSA method for passing data to a function where a copy of the value of a variable of interest is sent to the function Pass by value is not available in the MATLAB programming language, but pass by reference is. - ANSFalse pathtool - ANSUsed to instruct MATLAB to search for a given function pcolor( ) - ANSCreates a pseudocolor checkerboard plot plot( ) - ANSPlots y-data points vs. x-data points plot3( ) - ANSPlots a 3D plot polyfit( ) - ANSCreates a curve fit polyval( ) - ANSEvaluates the result of a polynomial from its coefficients pretty( ) - ANSPrints symbols in a plain-text format that resembles typeset mathematics
Some functions can have different behavior based on how they are used. - ANSTrue sprintf( ) - ANSUsed for printing output to a text string, and generally has formatting capabilities Static text box - ANSUsed for displaying text to the user String - ANSAn example of a character array Structure array - ANSThe MATLAB-created .m file uses this concept to pass information around the GUI-involved program Subfunctions - ANSThe MATLAB-created .m file uses this concept to organize the sections of the GUI-involved program subs( ) - ANSUsed to substitute in numbers, symbols, or other variable name(s) surf( ) - ANSPlots a 3D surface plot Switches can only check for equality, while if statements can check for equality or inequality. - ANSTrue syms - ANSDeclares a variable as a symbol The choice between numerical integration approaches depends on what the data looks like and what computational expense you can tolerate. - ANSTrue The default angular unit in MATLAB is radians unless specified otherwise. - ANSTrue The difference between for loops, while loop, and do while loops is that for loops ________, while loops _______, and do while loops _______, - ANS1. repeat a block of code a fixed number of times
The input (or output) order must be consistent between a function and whatever calls it.
Which built-in command would you use if you wanted to generate uniformly distributed pseudorandom numbers? - ANSrand( ) Which of the following are characteristics of computers? - ANS1. Do not tire