• ¿Documento equivocado? Cámbialo gratis
  • Escrito por estudiantes que aprobaron
  • Inmediatamente disponible después del pago
  • Leer en línea o como PDF
Vender
¿Dónde estudias?
Tu idioma
Document preview thumbnail
Vista previa 3 fuera de 17 páginas
Examen

Engineering 101 MATLAB Exam With Complete Solutions Latest Update

Document preview thumbnail
Vista previa 3 fuera de 17 páginas

Engineering 101 MATLAB Exam With Complete Solutions Latest Update...

Vista previa del contenido

Engineering 101 MATLAB Exam With Complete
Solutions Latest Update


program - ANSWER a sequence of statements that instruct the computer to do
something.



interactive program - ANSWER Write statements in the terminal. Hitting Return executes
them immediately



script - ANSWER Write a series of statements ahead of time. Execute those statements
sometime later



suppress an output - ANSWER ;;



display - ANSWER produces an output



variables - ANSWER used to store data. refers to some chunk of memory where the
program stores a value. may contain letters of '_'. Case sensitive

ex: x, y, z



expressions - ANSWER used to compute new data

ex: x = 10+5, y = x .* 7.

consist of literals (3, 7.5), variables (a,b,c), and function calls (sin(3), sqrt(x))



assignment - ANSWER used to store a value into a variable

LHS = RHS, work right to left, takes the value of the RHS and stores it into the LHS.

ex: x .* 7 is assigned to y. variable may be re-assigned many times in code

,operators - ANSWER form compound expressions (+, *, -, etc)



whos - ANSWER used to get information about a variable, including the type of data it
currently stores



orange line around = - ANSWER warning, code will still run



comments - ANSWER use the % symbol. anything after the % until the end of the line is a
comment, comments are ignored by the program but are more for the human reader of
the code to help manage complexity



scalar - ANSWER single number or element



vector - 1 dimensional sequence of numbers or elements, numbers or elements can be
separated with spaces or commas



matrix - 2 dimensional grid of numbers or elements, you separate rows using ; or a new
line. you can use smaller matrices as components, if things doesn't line up, you get an
error



[] creates a vector or a matrix



(:) creates evenly spaced vectors. first:step:last

ex: 1:3:12 outputs [1,4,7,10], if the step is omitted it defaults to one



(') - ANSWER transpose operation takes a matrix and produces a copy with the rows
turned into columns



flipud - ANSWER flips the rows up/down

, fliplr - ANSWER flips columns left or right



array - ANSWER everything in matlab is an array. scalar = 1x1, vector = mx1 or 1xn,
matrix is mxn



zeros(m,n) - ANSWER returns an m x n matrix of zeros



zeros(m) - ANSWER returns a matrix of zeros using m for both rows and columns



ones(m,n) - ANSWER returns a m x n matrix of ones



ones(m) - ANSWER returns a matrix of ones using m for both rows and columns



magic(s) - ANSWER returns an s x s magic matrix. magic because each column sum =
each row sum = each diagonal sum.



repmat(A,xTimes,yTimes) - ANSWER makes a new matrix based on repeating matrix A a
certain number of times in the x direction and y direction



reshape(A,numRows,numCols) - ANSWER creates a new matrix with the same elements
as A, but the requested number of rows and columns. The dimensions must match up
with the original number of elements in A.



numel(x) - ANSWER gives the number of elements in x



length(x) - ANSWER gives the number of elements along the longest dimension of x



size(x) - ANSWER returns a vector with the number of elements along each dimension of

Información del documento

Subido en
11 de noviembre de 2024
Número de páginas
17
Escrito en
2024/2025
Tipo
Examen
Contiene
Preguntas y respuestas
$15.49

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
Easton
3.9
(124)
Vendido
605
Seguidores
221
Artículos
28026
Última venta
2 días hace




Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes