100% de satisfacción garantizada Inmediatamente disponible después del pago Tanto en línea como en PDF No estas atado a nada 4,6 TrustPilot
logo-home
Examen

eng1060-computing-for-engineers-hd.pdf

Puntuación
-
Vendido
-
Páginas
28
Grado
A+
Subido en
01-04-2024
Escrito en
2023/2024

Exam study book ENG1060 of Steven C. Chapra, William John Palm, Wai Ho Li - ISBN: 9780070285125

Institución
Grado










Ups! No podemos cargar tu documento ahora. Inténtalo de nuevo o contacta con soporte.

Libro relacionado

Escuela, estudio y materia

Grado

Información del documento

Subido en
1 de abril de 2024
Número de páginas
28
Escrito en
2023/2024
Tipo
Examen
Contiene
Preguntas y respuestas

Temas

Vista previa del contenido

lOMoARcPSD|5967629




Eng1060 computing for engineers hd


Computing For Engineers (Monash University)




StuDocu is not sponsored or endorsed by any college or university
Downloaded by IAN NJUGUNA ()

, lOMoARcPSD|5967629




EN G 1 0 6 0
M ATLAB ba sics
- Defining variables
- Syntax: variable_name = value(s)
- No special characters , . / : ; ~ ^ ! ? \
- No foreign characters Γ Ψ Ω Π ᾢ 안 녕 하 세 요 Ӫ Ɲ ũ Ậ
- Cannot start the variable name with a numerical character 0 1 2 3 4 5 6 7 8 9 Commented [tr1]: Must start with letter, is case sensitive
- No blank spaces e.g car acceleration Commented [tr2]: car_accel is acceptable


- Command window
- Treat like calculator
- Does not save work Commented [tr3]: Do work in m-files


- Operator precedence
1. Parentheses ()
2. Transpose (.’), power (.^), complex conjugate transpose (’), matrix power (^)
3. Unary plus (+), unary minus (-), logical negation (~)
4. Multiplication (.*), right division (./), left division (.\), matrix multiplication (*),
matrix right division (/), matrix left division (\)
5. Addition (+), subtraction (-)
6. Colon operator (:)
7. Less than (<=), greater than (>), greater than or equal to (>=), equal to (==),
not equal to (~=)
8. Element-wise AND (&)
9. Element-wise OR (|)
10. Short-circuit AND (&&)
11. Short-circuit OR (||)

- Built-in functions Commented [tr4]: Built-in variables
e.g. Imaginary number, Euler’s number, infinity, pi, NaN, etc.
– sqrt, mod, rem
– log, log10, exp
– sin, cos, tan
– round, ceil, floor = round to nearest, round down, round up
– min, max, sign

- Built-in commands Commented [tr5]: help <function name> or
doc <function name> for MATLAB help
clc: Clears the command window
clear all: Clears all variables
close all: Closes all figure windows
fclose all: Closes all files opened by MATLAB
who: Lists existing variables
whos: Lists existing variables and other properties
dir: Lists everything in the current directory




Downloaded by IAN NJUGUNA ()

, lOMoARcPSD|5967629




M a t r ice s
• A matrix is a variable with multiple values
• Also called arrays

- Creating 1D matrices (vectors) Commented [tr6]: Use apostrophe/transpose operator ‚
to convert row to column or visa versa
- Square brackets [ ] to create matrices
- Row vectors are horizontal
Syntax: A = [1 2 3 4] or A = [1, 2, 3, 4]
- Column vectors are vertical
Syntax: B = [5; 6; 7; 8]

- The Colon Operator Commented [tr7]: Use colon if given step size
- Creates a vector with equally spaced values using a specified spacing
- Syntax: start_value : step : end_value Commented [tr8]: Default step of 1 if step is omitted
A = [6 7 8 9 10] or A = 6 : 1 : 10 or A = 6 : 10
B = [6 11 16 21 26] or B = 6 : 5 : 26
C = [6 4 2 0 -2 -4] or C = 6 : -2: -4
- Colon operator to create column vectors?
Use round brackets with apostrophe: A = (1 : 20)’

- The linspace Function Commented [tr9]: Use linspace if given no. of values
- Create a vector with equally spaced values using a specified number of points
- Syntax: linspace(start_value, end_value, num_of_points)
A = [1 2 3 4 5 6] or linspace(1, 6, 6)
B = [3.8510 4.5158 5.1807 5.8455 6.5103 7.1752 7.84] or
B = linspace(3.851, 7.84, 7)

- Creating 2D matrices
- A 2-dimensional matrix contains multiple rows and columns
- Use square brackets [ ] to create a 2 dimensional matrix Commented [tr10]: Rows then columns
MATLAB refers to the rows first, then the columns
A = [1 2 3; 4 5 6] (2 × 3 matrix) or using colon operator A = [1:3; 4:6]

- Matrix concatenation & functions
- Matrices can be concatenated to make larger matrices
- Matrices can only join if one of their dimensions are the same
- Matrices can be created using
A = zeros(rows, columns)
B = ones(rows, columns)
C = eye(rows, columns) identity matrix I
D = rand(rows, columns)
- Matrix properties can be obtained using
Longest_side = length(matrix)
[rows, columns] = size(matrix)




Downloaded by IAN NJUGUNA ()
$3.49
Accede al documento completo:

100% de satisfacción garantizada
Inmediatamente disponible después del pago
Tanto en línea como en PDF
No estas atado a nada

Conoce al vendedor
Seller avatar
Pieces

Conoce al vendedor

Seller avatar
Pieces Teachme2-tutor
Seguir Necesitas iniciar sesión para seguir a otros usuarios o asignaturas
Vendido
0
Miembro desde
2 año
Número de seguidores
0
Documentos
60
Última venta
-
Sell Notes online and Exams, Your no 1 NURSING COURSE EXAMS AND STUDY RESOURCES

Nursing course Exams and Notes Online NCLEX -RN, TEAS, HESI, NURSING Exams Detailed elaboration for the Answers, 100% success on your studies Best wishes.

0.0

0 reseñas

5
0
4
0
3
0
2
0
1
0

Recientemente visto por ti

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