Está en la página 1de 9

Operaciones Unitarias II - Ingeniera Qumica - Facultad de Ingeniera- U.N.

Sa
1 Cuatrimestre 2014 - Plan 1999
Ing. Antonio Bonomo
Ing. Silvia Zamora
Inicio de T.P.N1 19/03/2014
Entrega T.P.N1 26/03/2014
OSOREZ, Maria de los Angeles
Trabajo Parctico N 1
Introduccin al empleo de Mathcad
Definicin de variables:
t :=
Clculos iterativos
t 10 11 , 20 .. :=
acel 9.8 :=
acel t
2

2
-490
-592.9
...
=
t 10s 11s , 20s .. :=
g 9.807
m
s
2
=
g t
2

2
-490.332
-593.302
...
m
=
Definicion de Funciones
d t ( ) 1600
acel
2
t
2
+ :=
d 3.5 ( ) 1.54 10
3
=
t 10 11 , 20 .. :=
d t ( )
3
1.1110
3
1.00710
...
=
Grficos
10 12 14 16 18 20
500
0
500
1 10
3

1.5 10
3

d t ( )
t
Introduccin de operadores
a
x y +
a
x
y +
Multiplicacin
ax b y 0 =
Divisin
a b +
a y +
c
a b + ( ) c
a y +
Ejemplos
Conversin simple (Celsius ---> Fahrenheit)
Celcius 10 :=
Fahrenheit 1.8Celcius 32 + :=
Fahrenheit 50 =
Conversin simple (Fahrenheit ---> Celsius)
Fahrenheit 100 :=
Celcius
Fahrenheit 32
1.8
:=
Celcius 37.778 =
Distintas formas de realizar grficos en 2D
C 0 10 , 100 .. :=
F C ( ) 1.8C 32 + :=
0 20 40 60 80 100
0
50
100
150
200
250
F C ( )
C
C
0
10
...
= F C ( )
32
50
...
=
Grfico de una funcin vs. un rango variable
c 0 10 , 100 .. :=
F
c
1.8c 32 + :=
c
0
10
...
= F
c
32
50
...
=
F
10
50 =
Grfico de un vector vs. un ndice variable
0 20 40 60 80 100
0
50
100
150
200
250
F
c
c
C
c
c :=
0 20 40 60 80 100
0
50
100
150
200
250
F
c
C
c
Vectorizar una funcin
x
1
2
|

\
|
|
.
:=
sin x ( )

0.841
0.909
|

\
|
|
.
=
sin x ( )
0.841
0.909
|

\
|
|
.
=
Matrices de entrada:
A0
1
2
3
2
3
1
3
1
2
|

\
|
|
|
.
:= B0
4
7
6
5
8
5
6
7
4
|

\
|
|
|
.
:=
A0B0 ( )

4
14
18
10
24
5
18
7
8
|

\
|
|
|
.
= A0B0 ( )
36
35
31
36
39
33
32
37
33
|

\
|
|
|
.
=
Operacion en un vector
A1
1
2
3
|

\
|
|
|
.
:= B1
3
2
1
|

\
|
|
|
.
:=
A1B1 10 = A1B1 ( )

3
4
3
|

\
|
|
|
.
=
Como se resuelve una ecuacin algebraica de la forma f(x)=0 con la funcin raiz " root" .
x 1 :=
f x ( ) sin x ( ) x
2
:=
root f x ( ) x , ( ) 0.877 =
x root f x ( ) x , ( ) :=
x 0.877 =
x 0 :=
f x ( ) sin x ( ) x
2
:=
root f x ( ) x , ( )
x 0 =
Generar un grfico
x 0 0.1 , 2 .. :=
0 0.5 1 1.5 2
4
3
2
1
0
1
0
f x ( )
0.877
x
a 1 :=
f x ( ) a x + :=
f 2 ( ) 3 =
a 2 :=
f 2 ( ) 3 =
Ejemplo de una ecuacin de ms de una variable
f x a , ( ) sin x ( ) ax
2
:=
f 1 0.5 , ( ) 0.341 =
x 1 :=
Como se genera una funcin vectorizada -- definir cada elemento de la funcin separadamente
f
0
x ( ) 1 x + :=
f
1
x ( ) 2 3 x + :=
Combinacion de componentes
f x ( )
f
0
x ( )
f
1
x ( )
|

\
|
|
|
.
:=
Vectorizacion de la funcion como un todo
f 3 ( )
4
11
|

\
|
|
.
=
Vectorizacion de la funcion por componentes separados
f 3 ( )
0
4 =
f 3 ( )
1
11 =
Resolucin de un conjunto de ecuaciones con la funcin " Find"
x 0 :=
y 0 :=
Given
x
2
y
2
+ 6 =
x y + 2 =
Find x y , ( )
2.414
0.414
|

\
|
|
.
=
x 0 :=
y 0 :=
Given
x
2
y
2
+ 6 =
x y + 2 =
x
y
|

\
|
|
.
Find x y , ( ) :=
x 2.414 =
y 0.414 =
Resolver una ecuacin con " Find"
x 1 :=
Given
sin x ( ) x
2
=
Find x ( ) 0.877 =
Graficos
x 0 0.1 , 2 .. :=
0 0.5 1 1.5 2
0
1
2
3
4
sin x ( )
x
2
x
c 5 :=
y 10 9 , 10 .. :=
x 5 5 .. :=
F y ( ) 0.1y
2
3 + :=
f x ( ) x
2
c + :=
10 5 0 5 10
0
10
20
30
F y ( )
f x ( )
y x ,
10 5 0 5 10
0
10
20
30
0.1 y
2
3 +
x
2
c +
y x ,
Iteraciones
x
0
1 :=
i 0 10 .. :=
x
i 1 +
x
i
2 + :=
a
i
x
i
1 + :=
i
0
1
...
= x
i
1
3
...
= a
i
2
4
...
= x
0
0
1
2
1
3
...
=
Trabajo con matrices
A
1
2
3
4
5
6
7
8
9
10
11
12
|

\
|
|
|
.
:=
Extraer una columna
A
1
( )
4
5
6
|

\
|
|
|
.
= A
3
( )
10
11
12
|

\
|
|
|
.
=
Extraer un elemento de una columna
A
1
( )
( )
2
6 =
A
2 1 ,
6 =
Graficar una matriz
i 0 2 .. :=
j 0 3 .. :=
0 0.5 1 1.5 2
0
5
10
15
4
12
A
i j ,
i
0 1 2 3
0
5
10
15
A
i j ,
j Representar lineas separadas
0 1 2 3
0
5
10
15
A
0 j ,
A
1 j ,
A
2 j ,
j
Grafico de cada columna
0 0.5 1 1.5 2
0
5
10
15
A
j
( )
( )
i
i
Matriz transpuesta Matriz inversa
A
1
= A
A
T
1
4
7
10
2
5
8
11
3
6
9
12
|

\
|
|
|
|
|
.
=
Operaciones con matrices
B
2
3
0
6
6
1
9
9
4
|

\
|
|
|
.
:= C
4
2
3
8
5
0
6
9
2
|

\
|
|
|
.
:=
B C
47
51
14
46
54
5
84
90
17
|

\
|
|
|
.
= B
1
1
0.8
0.2
1
0.533
0.133
0
0.6
0.4
|

\
|
|
|
.
= B C +
6
5
3
14
11
1
15
18
6
|

\
|
|
|
.
=
B C
2
1
3
2
1
1
3
0
2
|

\
|
|
|
.
= B 15 = B B
1

1
0
0
0
1
0
0
0
1
|

\
|
|
|
.
=

También podría gustarte