100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Class notes

Manual de Octave Cálculo e Informática Completo

Rating
-
Sold
-
Pages
68
Uploaded on
14-03-2022
Written in
2022/2023

Apuntes (Apuntes)

Institution
Course











Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
Study
Course

Document information

Uploaded on
March 14, 2022
Number of pages
68
Written in
2022/2023
Type
Class notes
Professor(s)
Paca
Contains
All classes

Subjects

Content preview

Introducción a GNU Octave
Aplicaciones en ingeniería

CMCM
Rev.04A
5 de septiembre de 2015




Manual GNU Octave página 1 de 68

, Índice general




1. INTRODUCCIÓN 4

1.1. ¿Qué es Octave? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

1.2. ¿Cómo se escriben los números? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

1.3. ¿Cómo escribir las operaciones aritméticas elementales ? . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

1.4. Orden en que se realizan las operaciones aritméticas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

1.5. Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

1.6. Variables predefinidas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

1.7. Funciones matemáticas elementales . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

1.8. Números complejos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9


2. VECTORES Y MATRICES 11

2.1. Definición de vectores y matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

2.1.1. Definir vectores . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

2.1.2. Definir matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

2.2. Operaciones con vectores y matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

2.3. Resolución de sistemas lineales de ecuaciones . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15


3. REPRESENTACIÓN GRÁFICA DE FUNCIONES 17

3.1. Curvas planas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

3.2. Curvas en el espacio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

3.3. Superficies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23


4. CÁLCULO DE RAÍCES DE ECUACIONES, INTERPOLACIÓN, MÍNIMOS DE FUNCIONES E INTEGRALES
DEFINIDAS 26

4.1. Resolución de ecuaciones no lineales . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26



2

, 4.2. Raíces de polinomios . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

4.3. Interpolación . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

4.3.1. Interpolación unidimensional . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

4.3.2. Interpolación multidimensional . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

4.3.3. Regresión polinómica . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

4.4. Resolución de sistemas de ecuaciones no lineales . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

4.5. Mínimos de funciones . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

4.5.1. Funciones de una variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

4.5.2. Funciones de varias variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

4.6. Cálculo de integrales definidas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

4.6.1. Integral definida de un conjunto de datos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

4.6.2. Integral definida de una función . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

4.6.3. Integrales dobles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43


5. RESOLUCIÓN NUMÉRICA DE ECUACIONES DIFERENCIALES ORDINARIAS 45

5.1. Problemas de valor inicial para ecuaciones diferenciales ordinarias . . . . . . . . . . . . . . . . . . . . . . 45

5.1.1. Ejemplo: EDO lineal. LEY DE ENFRIAMIENTO DE NEWTON . . . . . . . . . . . . . . . . . . . . . 46

5.1.2. Ejemplo :EDO no lineal. TEOREMA DE TORRICELLI . . . . . . . . . . . . . . . . . . . . . . . . . . 47

5.1.3. Ejemplo :EDO con funciones discontinuas. TANQUES DE MEZCLA. . . . . . . . . . . . . . . . . . 48

5.2. Problemas de valor inicial para ecuaciones diferenciales ordinarias de orden superior (n>1) . . . . . . . 49

5.2.1. Ejemplo: EDO 2º Orden. ECUACIÓN DE VAN DER POL . . . . . . . . . . . . . . . . . . . . . . . . 49

5.2.2. Ejemplo: EDO 2º Orden. MÉTODO MATRICIAL (Modelo de espacio de estados). . . . . . . . . . 50

5.3. Estudio de la sensibilidad de parámetros en ecuaciones diferenciales ordinarias . . . . . . . . . . . . . . 51

5.3.1. Ejemplo :EDO con intervalo de variación de condiciones iniciales. . . . . . . . . . . . . . . . . . . 51

5.3.2. Ejemplo :EDO con intervalo de variación de un parámetro. . . . . . . . . . . . . . . . . . . . . . . . 52

5.4. Problema de valor inicial para sistemas de ecuaciones diferenciales ordinarias . . . . . . . . . . . . . . . 53

5.4.1. Ejemplo: Sistema EDO. MODELO DE LOTKA-VOLTERRA . . . . . . . . . . . . . . . . . . . . . . . 54


6. OPTIMIZACIÓN 55

6.1. INVESTIGACIÓN OPERATIVA. Programación lineal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

6.1.1. APLICACIONES DE LA PROGRAMACIÓN LINEAL A LA LOGÍSTICA . . . . . . . . . . . . . . . . 58

6.1.2. APLICACIONES DE LA PROGRAMACIÓN LINEAL A PROBLEMAS DE BLENDING O MEZCLA. 59

6.2. OPTIMIZACIÓN DE FUNCIONES. Estimación de parámetros en modelos dinámicos . . . . . . . . . . . 61

6.3. OPTIMIZACIÓN NO LINEAL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64

Quinta revisión: Septiembre 2015
Cuarta revisión: Noviembre 2014
Tercera revisión: Septiembre 2014
Segunda revisión: Abril 2014
Primera revisión: Febrero 2014




Manual GNU Octave página 3 de 68

, CAPÍTULO 1



INTRODUCCIÓN




1.1. ¿Qué es Octave?

GNU Octave es un lenguaje de alto nivel destinado para el cálculo numérico. Provee una interfaz sencilla,
orientada a la línea de comandos (consola), que permite la resolución de problemas numéricos, lineales y no lineales,
además permite la ejecución de scripts y puede ser usado como lenguaje orientado al procesamiento por lotes.

Octave nació alrededor del año 1988, y fue concebido originalmente para ser usado en un curso de diseño
de reactores químicos para los alumnos de Ingeniería Química de la Universidad de Texas y la Universidad de
Wisconsin-Madison.

Octave posee una gran cantidad de herramientas que permiten resolver problemas de algebra lineal, cálculo
de raíces de ecuaciones no lineales, integración de funciones ordinarias, manipulación de polinomios, integración
de ecuaciones diferenciales ordinarias y ecuaciones diferenciales algebraicas. Sus funciones también se pueden
extender mediante funciones definidas por el usuario escritas en el lenguaje propio de Octave o usando módulos
dinámicamente cargados escritos en lenguajes como C, C++ y Fortran entre otros.


1.2. ¿Cómo se escriben los números?

• Enteros (sin punto decimal):


>> 23 321 −34



• Reales (con punto decimal):


>> 23. −10.1 11.321



• Reales (notación científica o exponencial):


>> 2.e−2 = 2*10^(−2) = 0.02
>> 2.1e+5 = 2.1*10^(5) = 210000




4
$6.63
Get access to the full document:

100% satisfaction guarantee
Immediately available after payment
Both online and in PDF
No strings attached

Get to know the seller
Seller avatar
antoniomuozsnchez

Get to know the seller

Seller avatar
antoniomuozsnchez Universidad de Cádiz
Follow You need to be logged in order to follow users or courses
Sold
0
Member since
3 year
Number of followers
0
Documents
21
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions