Introduccion matlab
Grupo SABADOS 12-14PM Fecha: 18/09/2010
Nº MATRICULA APELLIDOS y NOMBRES
08190132 Perales Vallejos Marco André
………………….. …………………………………………………………………………………………..
ACTIVIDAD 1: COMO INTRODUCIR NUMEROS
A) Acerca de distintos valores de precisión.
Números aproximados con laprecisión máxima de la máquina (16 dígitos)
clear
format long;
exp(1)
0.5*exp(1)
>> clear
format long;
exp(1)
0.5*exp(1)
ans =
2.718281828459046
ans =
1.359140914229523
>>
Numeros aproximados con 200 decimales de precisión:
digits(200);
vpa(exp(1))
vpa(0.5*exp(1))
>> digits(200);
vpa(exp(1))
vpa(0.5*exp(1))
ans =2.718281828459045534884808148490265011787414550781250000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
0000000000000000000
ans =
1.359140914229522767442404074245132505893707275390625000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000
>>
B) Tarea 1: Experimente con [pic] y con [pic] en vez de [pic].
digits(200);
vpa(pi)
vpa(0.5*pi)
>> digits(200);
vpa(pi)
vpa(0.5*pi)
ans =
3.141592653589793238462643383279502884197169399375105820974944
592307816406286208998628034825342117067982148086513282306647093844609550582231725359408128481117450284102701938521105559
6446229489549303820
ans =
1.570796326794896619231321691639751442098584699687552910487472
296153908203143104499314017412671058533991074043256641153323
546922304775291115862679704064240558725142051350969260552779
8223114744774651910
>> digits(200);
vpa(sqrt(2))
vpa(0.5*sqrt(2))
>> digits(200);
vpa(sqrt(2))
vpa(0.5*sqrt(2))
ans =1.414213562373095048801688724209698078569671875376948073176679
737990732478462107038850387534327641572735013846230912297024
924836055850737212644121497099935831413222665927505592755799
9505011527820605715
ans =
.707106781186547524400844362104849039284835937688474036588339
868995366239231053519425193767163820786367506923115456148512462418027925368606322060748549967915706611332963752796377899
97525057639103028575
>>
C) GENERAR
a) D=-4.56:0.34 b) C=-2.1:0.1:3:4
d) F=80:5 d) r=pi:-0.001:0
>> D=-4.56:0.34
D =
Columns 1 through 4
-4.560000000000000 -3.560000000000000 -2.560000000000000 -1.560000000000000
Column 5
-0.560000000000000
>>
>> C=-2.1:0.1:3.4
C =
Columns 1through 4
-2.100000000000000 -2.000000000000000 -1.900000000000000 -1.800000000000000
Columns 5 through 8
-1.700000000000000 -1.600000000000000 -1.500000000000000 -1.400000000000000
Columns 9 through 12
-1.300000000000000 -1.200000000000000 -1.100000000000000 -1.000000000000000
Columns 13 through 16
-0.900000000000000 -0.800000000000000 -0.700000000000000-0.600000000000000
Columns 17 through 20
-0.500000000000000 -0.400000000000000 -0.300000000000000 -0.200000000000000
Columns 21 through 24
-0.100000000000000 0 0.100000000000000 0.200000000000000
Columns 25 through 28
0.300000000000000 0.400000000000000 0.500000000000000 0.600000000000000
Columns 29 through 320.700000000000000 0.800000000000000 0.900000000000000 1.000000000000000
Columns 33 through 36
1.100000000000000 1.200000000000000 1.300000000000000 1.400000000000000
Columns 37 through 40
1.500000000000000 1.600000000000000 1.700000000000000 1.800000000000000
Columns 41 through 44
1.900000000000000 2.000000000000000 2.100000000000000 2.200000000000000...
Regístrate para leer el documento completo.