









Prepara tus exámenes y mejora tus resultados gracias a la gran cantidad de recursos disponibles en Docsity
Gana puntos ayudando a otros estudiantes o consíguelos activando un Plan Premium
Prepara tus exámenes
Prepara tus exámenes y mejora tus resultados gracias a la gran cantidad de recursos disponibles en Docsity
Prepara tus exámenes con los documentos que comparten otros estudiantes como tú en Docsity
Encuentra los documentos específicos para los exámenes de tu universidad
Estudia con lecciones y exámenes resueltos basados en los programas académicos de las mejores universidades
Responde a preguntas de exámenes reales y pon a prueba tu preparación
Consigue puntos base para descargar
Gana puntos ayudando a otros estudiantes o consíguelos activando un Plan Premium
Comunidad
Pide ayuda a la comunidad y resuelve tus dudas de estudio
Ebooks gratuitos
Descarga nuestras guías gratuitas sobre técnicas de estudio, métodos para controlar la ansiedad y consejos para la tesis preparadas por los tutores de Docsity
Este documento proporciona una descripción detallada de los comandos y funciones disponibles en MATLAB, divididos en tres partes: Operadores y caracteres especiales, Input/Output y formato, y Funciones y herramientas numericas. La primera parte abarca los operadores aritmeticos, de asignación y de control de flujo, así como los comandos para manejar sesiones y variables especiales. La segunda parte trata sobre el manejo de archivos y cadenas, la entrada y salida, y el formato de impresión. La tercera parte se dedica a las funciones matemáticas, estadísticas y de transformadas laplacianas, así como a los métodos numéricos para solucionar ecuaciones y aproximar funciones.
Tipo: Guías, Proyectos, Investigaciones
1 / 17
Esta página no es visible en la vista previa
¡No te pierdas las partes importantes!










ans (^) Most recent answer. eps (^) Accuracy of floating-point precision. i,j (^) The imaginary unit - 1. Inf (^) Infinity. NaN (^) Undefined numerical result (not a number). pi (^) The number p.
cd (^) Changes current directory. date (^) Displays current date. delete (^) Deletes a file. diary (^) Switches on/off diary file recording. dir (^) Lists all files in current directory. load (^) Loads workspace variables from a file. path (^) Displays search path. pwd (^) Displays current directory. save (^) Saves workspace variables in a file. type (^) Displays contents of a file. what (^) Lists all MATLAB files in the current directory. wklread (^) Reads .wk1 spreadsheet file.
Input/Output and Formatting Commands
disp (^) Displays contents of an array or string. fscanf (^) Read formatted data from a file. format (^) Controls screen-display format. fprintf (^) Performs formatted writes to screen or file. input (^) Displays prompts and waits for input. ; (^) Suppresses screen printing.
%s (^) Format as a string. %d (^) Format as an integer. %f (^) Format as a floating point value. %e (^) Format as a floating point value in scientific notation. %g (^) Format in the most compact form: %f or %e. \n (^) Insert a new line in the output string. \t (^) Insert a tab in the output string.
format short (^) Four decimal digits (default). format long (^) 16 decimal digits. format short e (^) Five digits plus exponent. format long e (^) 16 digits plus exponents. format bank (^) Two decimal digits. format + (^) Positive, negative, or zero. format rat (^) Rational approximation. format compact (^) Suppresses some line feeds. format loose (^) Resets to less compact display mode.
cell (^) Creates cell array. celldisp (^) Displays cell array. cellplot (^) Displays graphical representation of cell array. num2cell (^) Converts numeric array to cell array. deal (^) Matches input and output lists. iscell (^) Identifies cell array.
fieldnames (^) Returns field names in a structure array. getfield (^) Returns field contents of a structure array. isfield (^) Identifies a structure array field. isstruct (^) Identifies a structure array. rmfield (^) Removes a field from a structure array. setfield (^) Sets contents of field. struct (^) Creates structure array.
Plotting Commands
axis (^) Sets axis limits. fplot (^) Intelligent plotting of functions. grid (^) Displays gridlines. plot (^) Generates xy plot. print (^) Prints plot or saves plot to a file title (^) Puts text at top of plot. xlabel (^) Adds text label to x-axis. ylabel (^) Adds text label to y-axis.
axes (^) Creates axes objects. close (^) Closes the current plot. close all (^) Closes all plots. figure (^) Opens a new figure window. gtext (^) Enables label placement by mouse. hold (^) Freezes current plot. legend (^) Legend placement by mouse. refresh (^) Redraws current figure window. set (^) Specifies properties of objects such as axes. subplot (^) Creates plots in subwindows. text (^) Places string in figure.
bar (^) Creates bar chart. loglog (^) Creates log-log plot. polar (^) Creates polar plot. semilogx (^) Creates semilog plot (logarithmic abscissa). semilogy (^) Creates semilog plot (logarithmic ordinate). stairs (^) Creates stairs pot. stem (^) Creates stem plot.
Programming
== (^) Relational operator: equal to. ~= (^) Relational operator: not equal to. < (^) Relational operator: less than. <= (^) Relational operator: less than or equal to.
(^) Relational operator: greater than. = (^) Relational operator: greater than or equal to. & (^) Logical operator: AND. | (^) Logical operator: OR. ~ (^) Logical operator: NOT. xor (^) Logical operator: EXCLUSIVE OR.
break (^) Terminates execution of a loop. case (^) Provides alternate execution paths within switch structure. else (^) Delineates alternate block of statements. elseif (^) Conditionally executes statements. end (^) Terminates for, while, and if statements. error (^) Display error messages. for (^) Repeats statements a specific number of times if (^) Executes statements conditionally. otherwise (^) Default part of switch statement. return (^) Return to the invoking function. switch (^) Directs program execution by comparing point with case expressions. warning (^) Display a warning message. while (^) Repeats statements an indefinite number of times.
any (^) True if any elements are nonzero. all (^) True if all elements are nonzero. find (^) Finds indices of nonzero elements. finite (^) True if elements are finite. isnan (^) True if elements are undefined. isinf (^) True if elements are infinite. isempty (^) True if matrix is empty. isreal (^) True if all elements are real.
eval (^) Interpret strings containing Matlab expressions. feval (^) Function evaluation. function (^) Creates a user-defined function M-file. global (^) Define global variables. nargin (^) Number of function input arguments. nargout (^) Number of function output arguments. script (^) Script M-files
cputime (^) CPU time in seconds. clock (^) Current date and time as date vector. tic, toc (^) Start, stop a stopwatch timer.
abs(x) (^) Absolute value; |x|. angle(x) (^) Angle of a complex number x. conj(x) (^) Complex conjugate of x. imag(x) (^) Imaginary part of a complex number x. real(x) (^) Real part of a complex number x.
erf(x) (^) Computes the error function erf (x). mean (^) Calculates the average. median (^) Calculates the median. std (^) Calculates the standard deviation.
rand (^) Generates uniformly distributed random numbers between 0 and 1. randn (^) Generates normally distributed random numbers.
ceil (^) Rounds to the nearest integer toward •. fix (^) Rounds to the nearest integer toward zero. floor (^) Rounds to the nearest integer toward - •. round (^) Rounds towards the nearest integer. sign (^) Signum function.
findstr (^) Finds occurrences of a string. strcmp (^) Compares strings. char (^) Creates character string array
Numerical Methods
conv (^) Computes product of two polynomials deconv (^) Computes ratio of polynomials. eig (^) Computes the eigenvalues of a matrix. poly (^) Computes polynomial from roots. polyfit (^) Fits a polynomial to data. polyval (^) Evaluates polynomial and generates error estimates. roots (^) Computes polynomial roots.
interp1 (^) Linear and cubic-spline interpolations of a function of one variable. interp2 (^) Linear interpolation of a function of two variables. spline (^) Cubic-spline interpolation. unmkpp (^) Computes the coefficients of cubic-spine polynomials.
fmin (^) Finds minimum of single-variable function. fmins (^) Finds minimum of multivariable function. fzero (^) Finds zero of single-variable function.
quad (^) Numerical integration with adaptive Simpson’s rule. quadl (^) Numerical integration with adaptive Lobatto quadrature. trapz (^) Numerical integration with the trapezoidal rule.
diff(x) (^) Computes the difference between adjacent elements in the vector x. polyder (^) Differentiates a polynomial, a polynomial product, or a polynomial quotient.
Symbolic Math Toolbox
class (^) Returns the class of an expression. digits (^) Sets the number of decimal digits used to do variable precision arithmetic. double (^) Converts an expression to numeric form. ezplot (^) Generates a plot of a symbolic expression. findsym (^) Finds the symbolic variables in a symbolic expression. numden (^) Returns the numerator and denominator of an expression. sym (^) Creates a symbolic variable. syms (^) Creates one or more symbolic variables. vpa (^) Sets the number of digits used to evaluate expressions.
collect (^) Collects coefficients of like powers in an expression. expand (^) Expands an expression by carrying out jpowers. factor (^) Factors an expression. poly2sym (^) Converts a polynomial coefficient vector to a symbolic polynomial. pretty (^) Displays an expression in a form that resembles typeset mathematics. simple (^) Searches for the shortest form of an expression. simplify (^) Simplifies an expression using Maple’s simplification rules. subs (^) Substitutes variables or expressions. sym2poly (^) Converts an expression to a polynomial coefficient vector.
diff (^) Returns the derivative of an expression. Dirac (^) Dirac delta function (unit impulse). Heaviside (^) Heaviside function (unit step). int (^) Returns the integral of an expression. limit (^) Returns the limit of an expression. symsum (^) Returns the symbolic summation of an expression. taylor (^) Returns the Taylor series of a function.
solve (^) Solves symbolic equations.
dsolve (^) Returns a symbolic solution of a differential equation or set of equations.
ilaplace (^) Returns the inverse Laplace transform. laplace (^) Returns the Laplace transform.
det (^) Returns the determinant of a matrix. eig (^) Returns the eigenvalues (characteristic roots) of a matrix. inv (^) Returns the inverse of a matrix. poly (^) Returns the characteristic polynomial of a matrix.