Sunteți pe pagina 1din 12

TRABAJO DE METODOS NUMERICOS

LUIS ANGEL NINA SANCHEZ


PRIMERA PARTE:
1. Con la orden help del Matlab investigar el uso de las funciones floor y
ceil, explicar qu es lo que hacen y de un ejemplo para cada uno.
Qu funcin matemtica se comporta de esa manera, descrbala
mostrando su regla de correspondencia? Explicar.
Floor
floor - Ronda hacia el infinito negativo
Esta funcin MATLAB redondea los elementos de A a los enteros ms
prximos a menos de
o igual a A.
B = baja ( A)
Pgina de referencia para el piso
Ver tambin ceil , fijar , redondo
piso de otras funciones llamada
FixedPoint / piso

Ceil
ceil - Ronda hacia el infinito positivo
Esta funcin MATLAB redondea los elementos de A a los enteros ms
prximos a mayores
que o igual a A.
B = ceil ( A)
La pgina de referencia para ceil
Vase tambin fijar , piso , redondo
Otras funciones de llamada ceil
FixedPoint / ceil

2. Con ayuda de la orden help del Matlab investigar el uso de la funcin


feval, explicar qu es lo que hace y de un ejemplo de su uso.
Feval
feval - Evaluar la funcin
Esta funcin MATLAB evala el mango funcin, fhandle , usando
argumentos x1
a travs de xn .
[ Y1 , y2 , ... ] = feval ( fhandle , x1 , ... , xn )
[ Y1 , y2 , ... ] = feval ( fname , x1 , ... , xn )

La pgina de referencia para feval


Vase tambin , assignin orden interna , eval , evalin , function_handle ,
funciones
Otras funciones con nombre feval
CurveFit / feval , DistComp / feval , simblico / feval , Matlab / Fval
( COM )
Ejemplo:

>> feval(@(x)x^2+3*x ,5)


ans =
40
3. Que retorna las siguientes operaciones?
> >[0 1 0 1 ] | [ 1 0 2 0 ]
> >[~2 0 1]&[0 ~1 ~ 0 ]
>> [0 1 0 -1 ] | [ 1 0 2 0 ]
ans =
1

>> [~2 0 -1]&[0 ~1 ~ 0 ]


ans =
0

4. Mostrar el resultado de w si: >>x=[1 2 0 1 ] ; >>y = [ 3 1 1 4 ] ;


>>z = [ 0 2 0 0 ] ; >>w= ( x > y )&(~ z )
>> x=[-1 2 0 1 ] ;
y = [ 3 -1 1 4 ] ;
z=[0200];
w= ( x > y )&(~ z )
w=
0

5.

>> x=(pi/4);
y=exp(1);

z=(2.31);
w=log(x)+sqrt(1+y.^3)/1-sin(x)+y*z
w=
6.

9.9225
Si la medida de un ngulo x en grados sexagesimales es 30 , hallar
el valor de la expresin: w = x cos2 (1.23+x).
>> x=30;
w = x*(cos(1.23+x)).^2
w=
28.9748

7.

>> x=30;
w=(x+(cos(x)).^2/x.^2+1)-exp(-x)
w=
31.0000
>> x=45;
w=(x+(cos(x)).^2/x.^2+1)-exp(-x)
w=
46.0001
>> x=60;
w=(x+(cos(x)).^2/x.^2+1)-exp(-x)
w=
61.0003
>> x=90;
w=(x+(cos(x)).^2/x.^2+1)-exp(-x)
w=
91.0000
8.

>> x=[2 3 -1];


y=[4 -1 5];
z=[2 4 6];
w=(x.*y/x.^2+y.^2)+(log(z)).^2
w=
16.4805

2.9218 28.2104

9.

>> x=[sqrt(3) exp(2) pi];


y=[2.24 3.256 -4.67];
z=[30 45 60];
w=z.*cos(z)/(log(x.^2+y)).^2
w=
0.8622
10.A

>> x=[2.24 3.56 -4.67];


Y=[sqrt(2) 2.71 pi];
z=[30 45 60];
w=2-z.*sin(z)/(log(y.^2+x)).^2
w=
1.9622

11.Escribir los comandos que permitan graficar la funcin f (x) = 9x 2


en el dominio adecuado, hacer un bosquejo de su grfica.
>> y=sqrt(9-x.^2);
x=0:0.2:2;
plot(x,y)

12.Escribir los comandos necesarios para graficar la funcin y = sqrt(4|


x|).
> y = sqrt(4-abs(x))
x=0:0.2:2
plot(x,y)
y=
Columns 1 through 9
2.0000 1.9494
1.6125 1.5492

1.8974

1.8439

1.7889

1.7321

1.6733

Columns 10 through 11
1.4832

1.4142

x=
Columns 1 through 9
0
1.4000

0.2000
1.6000

0.4000

Columns 10 through 11
1.8000

2.0000

0.6000

0.8000

1.0000

1.2000

13.

>> y=log(4-abs(x))/x-4;
x=0:0.002:1
plot(x,y)
x=
Columns 1 through 9
0
0.0140

0.0020
0.0160

0.0040

0.0060

0.0080

0.0100

0.0120

Columns 10 through 18
0.0180 0.0200
0.0320 0.0340

0.0220

0.0240

0.0260

0.0280

0.0300

0.0420

0.0440

0.0460

0.0480

0.0600

0.0620

0.0640

0.0660

0.0780

0.0800

0.0820

0.0840

0.0960

0.0980

0.1000

0.1020

Columns 19 through 27
0.0360 0.0380
0.0500 0.0520

0.0400

Columns 28 through 36
0.0540 0.0560
0.0680 0.0700

0.0580

Columns 37 through 45
0.0720 0.0740
0.0860 0.0880

0.0760

Columns 46 through 54
0.0900 0.0920
0.1040 0.1060

0.0940

Columns 55 through 63
0.1080 0.1100
0.1220 0.1240

0.1120

0.1140

0.1160

0.1180

0.1200

0.1320

0.1340

0.1360

0.1380

0.1500

0.1520

0.1540

0.1560

0.1680

0.1700

0.1720

0.1740

0.1860

0.1880

0.1900

0.1920

0.2040

0.2060

0.2080

0.2100

0.2220

0.2240

0.2260

0.2280

0.2400

0.2420

0.2440

0.2460

0.2580

0.2600

0.2620

0.2640

0.2760

0.2780

0.2800

0.2820

Columns 64 through 72
0.1260 0.1280
0.1400 0.1420

0.1300

Columns 73 through 81
0.1440 0.1460
0.1580 0.1600

0.1480

Columns 82 through 90
0.1620 0.1640
0.1760 0.1780

0.1660

Columns 91 through 99
0.1800 0.1820
0.1940 0.1960

0.1840

Columns 100 through 108


0.1980 0.2000
0.2120 0.2140

0.2020

Columns 109 through 117


0.2160 0.2180
0.2300 0.2320

0.2200

Columns 118 through 126


0.2340 0.2360
0.2480 0.2500

0.2380

Columns 127 through 135


0.2520 0.2540
0.2660 0.2680

0.2560

Columns 136 through 144


0.2700 0.2720
0.2840 0.2860

0.2740

Columns 145 through 153

0.2880 0.2900
0.3020 0.3040

0.2920

0.2940

0.2960

0.2980

0.3000

0.3120

0.3140

0.3160

0.3180

0.3300

0.3320

0.3340

0.3360

0.3480

0.3500

0.3520

0.3540

0.3660

0.3680

0.3700

0.3720

0.3840

0.3860

0.3880

0.3900

0.4020

0.4040

0.4060

0.4080

0.4200

0.4220

0.4240

0.4260

0.4380

0.4400

0.4420

0.4440

0.4560

0.4580

0.4600

0.4620

0.4740

0.4760

0.4780

0.4800

Columns 154 through 162


0.3060 0.3080
0.3200 0.3220

0.3100

Columns 163 through 171


0.3240 0.3260
0.3380 0.3400

0.3280

Columns 172 through 180


0.3420 0.3440
0.3560 0.3580

0.3460

Columns 181 through 189


0.3600 0.3620
0.3740 0.3760

0.3640

Columns 190 through 198


0.3780 0.3800
0.3920 0.3940

0.3820

Columns 199 through 207


0.3960 0.3980
0.4100 0.4120

0.4000

Columns 208 through 216


0.4140 0.4160
0.4280 0.4300

0.4180

Columns 217 through 225


0.4320 0.4340
0.4460 0.4480

0.4360

Columns 226 through 234


0.4500 0.4520
0.4640 0.4660

0.4540

Columns 235 through 243


0.4680 0.4700
0.4820 0.4840

0.4720

Columns 244 through 252


0.4860 0.4880
0.5000 0.5020

0.4900

0.4920

0.4940

0.4960

0.4980

0.5100

0.5120

0.5140

0.5160

0.5280

0.5300

0.5320

0.5340

0.5460

0.5480

0.5500

0.5520

0.5640

0.5660

0.5680

0.5700

0.5820

0.5840

0.5860

0.5880

0.6000

0.6020

0.6040

0.6060

0.6180

0.6200

0.6220

0.6240

0.6360

0.6380

0.6400

0.6420

0.6540

0.6560

0.6580

0.6600

Columns 253 through 261


0.5040 0.5060
0.5180 0.5200

0.5080

Columns 262 through 270


0.5220 0.5240
0.5360 0.5380

0.5260

Columns 271 through 279


0.5400 0.5420
0.5540 0.5560

0.5440

Columns 280 through 288


0.5580 0.5600
0.5720 0.5740

0.5620

Columns 289 through 297


0.5760 0.5780
0.5900 0.5920

0.5800

Columns 298 through 306


0.5940 0.5960
0.6080 0.6100

0.5980

Columns 307 through 315


0.6120 0.6140
0.6260 0.6280

0.6160

Columns 316 through 324


0.6300 0.6320
0.6440 0.6460

0.6340

Columns 325 through 333


0.6480 0.6500
0.6620 0.6640

0.6520

Columns 334 through 342

0.6660 0.6680
0.6800 0.6820

0.6700

0.6720

0.6740

0.6760

0.6780

0.6900

0.6920

0.6940

0.6960

0.7080

0.7100

0.7120

0.7140

0.7260

0.7280

0.7300

0.7320

0.7440

0.7460

0.7480

0.7500

0.7620

0.7640

0.7660

0.7680

0.7800

0.7820

0.7840

0.7860

0.7980

0.8000

0.8020

0.8040

0.8160

0.8180

0.8200

0.8220

0.8340

0.8360

0.8380

0.8400

0.8520

0.8540

0.8560

0.8580

Columns 343 through 351


0.6840 0.6860
0.6980 0.7000

0.6880

Columns 352 through 360


0.7020 0.7040
0.7160 0.7180

0.7060

Columns 361 through 369


0.7200 0.7220
0.7340 0.7360

0.7240

Columns 370 through 378


0.7380 0.7400
0.7520 0.7540

0.7420

Columns 379 through 387


0.7560 0.7580
0.7700 0.7720

0.7600

Columns 388 through 396


0.7740 0.7760
0.7880 0.7900

0.7780

Columns 397 through 405


0.7920 0.7940
0.8060 0.8080

0.7960

Columns 406 through 414


0.8100 0.8120
0.8240 0.8260

0.8140

Columns 415 through 423


0.8280 0.8300
0.8420 0.8440

0.8320

Columns 424 through 432


0.8460 0.8480
0.8600 0.8620

0.8500

Columns 433 through 441


0.8640 0.8660
0.8780 0.8800

0.8680

0.8700

0.8720

0.8740

0.8760

0.8880

0.8900

0.8920

0.8940

0.9060

0.9080

0.9100

0.9120

0.9240

0.9260

0.9280

0.9300

0.9420

0.9440

0.9460

0.9480

0.9600

0.9620

0.9640

0.9660

0.9780

0.9800

0.9820

0.9840

0.9960

0.9980

1.0000

Columns 442 through 450


0.8820 0.8840
0.8960 0.8980

0.8860

Columns 451 through 459


0.9000 0.9020
0.9140 0.9160

0.9040

Columns 460 through 468


0.9180 0.9200
0.9320 0.9340

0.9220

Columns 469 through 477


0.9360 0.9380
0.9500 0.9520

0.9400

Columns 478 through 486


0.9540 0.9560
0.9680 0.9700

0.9580

Columns 487 through 495


0.9720 0.9740
0.9860 0.9880

0.9760

Columns 496 through 501


0.9900

0.9920

0.9940

14.

15.
16.

S-ar putea să vă placă și