Академический Документы
Профессиональный Документы
Культура Документы
CONCEPTOS DE PROGRAMACIN
Definicin de las palabras reservadas, manejo del editor, lectura de datos, bucles, condicionales, flujo de datos, graficas. APLICACIONES Mtodos numricos. Integracin numrica, clculo de races (Fixed point, Newton-Raphson), Mtodos interpolantes (Lagrange), ODE (RK4).
OBJETIVOS
ADQUIRIR IDEAS NUEVAS, ABRIR LA MENTE Y ENTENDER LA IMPORTANCIA DE SABER PROGRAMAR. ELIMINAR LOS PRECEPTOS NEGATIVOS QUE SE TENGAN ACERCA DE LA PROGRAMACIN. APRENDER A UTILIZAR LAS HERRAMIENTAS COMPUTACIONALES DE LIBRE ACCESO COMO LO ES SCILAB. GENERAR PROGRAMACIN ESTRUCTURADA DE BUENA CALIDAD PARA RESOLVER LOS PROBLEMAS DE LA INGENIERIA EMPLEANDO EL EDITOR Y LA CONSOLA DE SCILAB.
Apariencia de la consola:
VARIABLES ESCALARES
Scilab discrimina entre maysculas y minsculas. Es por eso que no es lo mismo la variable A que la variable a.
El comando clear elimina todos los datos almacenados en las variables creadas y existentes.
Las variables no pueden almacenar caracteres ni cadenas de caracteres. Slo se disponen para almacenar datos del tipo double, float, integer y boolean. Operadores: (=) (+) (-) (*) (/) (**) (^) Constantes especiales %pi = %e = exp(1) %i = sqrt(-1) %inf = %T = true %eps =
VECTORES Y MATRICES
Se deben tener claras las reglas de operacin de los vectores y las matrices (algebra lineal).
1 3 4 5 2 6 7 6 3
-->a=[1,3,4;5,2,6;7,6,3] -->a(2,2) -->a(:,3) -->a(2:3,1:2)
VECTORES Y MATRICES
CREACIN DE MATRICES -->[2:5;1:4;11:14;8:11] matriz continua -->a=[2,1;2,3];b=[1;3]; operacin en un rengln -->[a b] combinacin de matrices -->ones(3,2) matriz de unos -->zeros(3,2) matriz de ceros -->eye(3,3) matriz diagonal -->diag([3,1,8]) matriz diagonal especificada -->diag([3,1,8],-1) matriz diagonal desplazada -->rand(3,2) matriz aleatoria OPERACIONES -->A -->A+B -->A*B -->A.*B -->cond(A) -->det(A) -->inv(A)
transpuesta suma multiplicacin multiplicacin elemento a elemento nmero condicional >0 determinante inversa de la matriz
FUNCIONES DE SCILAB
FUNCIONES -->exp() -->log() -->log10() -->sin() -->cos() -->tan() -->asin() -->acos() -->atan() -->abs() -->sqrt() -->size(A) -->P=poly(v,x,c) -->roots(P) -->coeff(P,#) -->horner(P,#) -->format(#) exponencial logaritmo natural logaritmo base 10 funcin seno funcin coseno funcin tangente funcin arcoseno funcin arcocoseno funcin arcotangente valor absoluto raz cuadrada dimensiones de matriz crear un polinomio calcular races coeficiente evaluar en un punto Modifica las cifras
FUNCIONES DE SCILAB
Redondeo:
CREAR FUNCIONES
function [a,b,c,]=nombredefuncion(x,y,z,) a=expresion(x,y,z,) b=expresion(x,y,z,) c=expresion(x,y,z,) endfunction [parametro1,parametro2,parametro3]=nombredefuncion(#,#,#)
EJERCICIOS
Resolver sistema lineal 5x5:
5 x1 2 x 2 5 x3 2 x1 12x 2 5 x3 4 x1 x 2 5 x3 3x1 2 x 2 5 x3
Resolver sistema no lineal 2x2:
2 x 4 5 x5 2 x 4 5 x5 22x 4 5 x5 2 x 4 8 x5 21x5
12 2 1 5 5
3x1 2 x 2 15x3 3x 4
x2 8 y2 16
y2
5sen( x )