You are on page 1of 36

Nombre: Gastaadui Tiburcio Victor Daniel

E.A.P.: Ing. Mecnica de Fluidos

MATLAB desktop keyboard shortcuts, such as Ctrl+S, are now customizable.

In addition, many keyboard shortcuts have changed for improved consistency

across the desktop.

To customize keyboard shortcuts, use Preferences. From there, you can also

restore previous default settings by selecting "R2009a Windows Default Set"

from the active settings drop-down list. For more information, see Help.

Click here if you do not want to see this message again.

>> J=(42.1768+234)/((2^10)-10247)

J=

-0.0299

>> H=((9.8*10^14)+(5.876*10^(-5)))/((9.987*10^5)-10^6)

H=

-7.5385e+011

>> I=(3sin(32.25*pi/180)/42.1^3)^(1/7)
??? I=(3sin(32.25*pi/180)/42.1^3)^(1/7)

Error: Unexpected MATLAB expression.

>> I=((3sin(32.25*pi/180))/42.1^3)^(1/7)

??? I=((3sin(32.25*pi/180))/42.1^3)^(1/7)

Error: Unexpected MATLAB expression.

>> I=((3*sin(32.25*pi/180))/42.1^3)^(1/7)

I=

0.2153

>> P=-21+5.44*293-0.132*(293^2)

P=

-9.7591e+003

>> p=9.265*10^6

p=

9265000
>> T=(-5.44+(5.44^2-4*(-0.132)*(-21))^0.5)/(-42)

T=

0.0271

>> T=(-5.44+(5.44^2-4*(-0.132)*(-21-p))^0.5)/2*(-0.132)

T=

3.5904e-001 -1.4598e+002i

>> A=[1 2 3;4 5 6;7 8 9]

A=

1 2 3

4 5 6

7 8 9

>> B=[ 1 2 3 ]

B=

1 2 3
>> V=[2 3 4]

V=

2 3 4

>> W=[2;3;4;7;9;8]

W=

>> A'

ans =

1 4 7

2 5 8

3 6 9

>> F=A'
F=

1 4 7

2 5 8

3 6 9

>> F*A

ans =

66 78 90

78 93 108

90 108 126

>> F.VV

??? Attempt to reference field of non-structure array.

>> F

>> F.^A

ans =

1 16 343

16 3125 262144

2187 1679616 387420489


>> F^A

??? Error using ==> mpower

Inputs must be a scalar and a square matrix.

>> A./F

ans =

1.0000 0.5000 0.4286

2.0000 1.0000 0.7500

2.3333 1.3333 1.0000

>> A/F

Warning: Matrix is singular to working precision.

ans =

NaN NaN NaN

NaN NaN NaN

NaN NaN NaN

>> inv()A

??? inv()A

Error: Unexpected MATLAB expression.


>> inv()B=inv()A

??? inv()B=inv()A

Error: Unexpected MATLAB expression.

>> diag(A)

ans =

>> inv(A)

Warning: Matrix is close to singular or badly scaled.

Results may be inaccurate. RCOND = 1.541976e-018.

ans =

1.0e+016 *

-0.4504 0.9007 -0.4504

0.9007 -1.8014 0.9007

-0.4504 0.9007 -0.4504


>> (A*F)^((A-F)*(A+F))

??? Error using ==> mpower

Inputs must be a scalar and a square matrix.

>> (A*F).^((A-F)*(A+F))

ans =

1.0e+155 *

0.0000 0.0000 0.0000

0.0000 0.0000 0.0000

0.0000 0.0000 3.7198

>> sum(diag(A))

ans =

15

>> zeros(5,4)

ans =

0 0 0 0

0 0 0 0
0 0 0 0

0 0 0 0

0 0 0 0

>> ones(45,9)

ans =

1 1 1 1 1 1 1 1 1

1 1 1 1 1 1 1 1 1

1 1 1 1 1 1 1 1 1

1 1 1 1 1 1 1 1 1

1 1 1 1 1 1 1 1 1

1 1 1 1 1 1 1 1 1

1 1 1 1 1 1 1 1 1

1 1 1 1 1 1 1 1 1

1 1 1 1 1 1 1 1 1

1 1 1 1 1 1 1 1 1

1 1 1 1 1 1 1 1 1

1 1 1 1 1 1 1 1 1

1 1 1 1 1 1 1 1 1

1 1 1 1 1 1 1 1 1

1 1 1 1 1 1 1 1 1

1 1 1 1 1 1 1 1 1

1 1 1 1 1 1 1 1 1

1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1

1 1 1 1 1 1 1 1 1

1 1 1 1 1 1 1 1 1

1 1 1 1 1 1 1 1 1

1 1 1 1 1 1 1 1 1

1 1 1 1 1 1 1 1 1

1 1 1 1 1 1 1 1 1

1 1 1 1 1 1 1 1 1

1 1 1 1 1 1 1 1 1

1 1 1 1 1 1 1 1 1

1 1 1 1 1 1 1 1 1

1 1 1 1 1 1 1 1 1

1 1 1 1 1 1 1 1 1

1 1 1 1 1 1 1 1 1

1 1 1 1 1 1 1 1 1

1 1 1 1 1 1 1 1 1

1 1 1 1 1 1 1 1 1

1 1 1 1 1 1 1 1 1

1 1 1 1 1 1 1 1 1

1 1 1 1 1 1 1 1 1

1 1 1 1 1 1 1 1 1

1 1 1 1 1 1 1 1 1

1 1 1 1 1 1 1 1 1

1 1 1 1 1 1 1 1 1

1 1 1 1 1 1 1 1 1

1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1

>> eye(5,4)

ans =

1 0 0 0

0 1 0 0

0 0 1 0

0 0 0 1

0 0 0 0

>> diag(4,4)

ans =

0 0 0 0 4

0 0 0 0 0

0 0 0 0 0

0 0 0 0 0

0 0 0 0 0

>> pi

ans =
3.1416

>> diag(1,5)

ans =

0 0 0 0 0 1

0 0 0 0 0 0

0 0 0 0 0 0

0 0 0 0 0 0

0 0 0 0 0 0

0 0 0 0 0 0

>> X=(1,4.5,7.8)

??? X=(1,4.5,7.8)

Error: Expression or statement is incorrect--possibly unbalanced (, {, or [.

>> X=[1,4.5,7.8]

X=

1.0000 4.5000 7.8000

>> Y=[sin(pi/2),cos(pi/4),0]
Y=

1.0000 0.7071 0

>> x*Y

??? Undefined function or variable 'x'.

>> X*Y

??? Error using ==> mtimes

Inner matrix dimensions must agree.

>> X+Y

ans =

2.0000 5.2071 7.8000

>> dot(X,Y)

ans =

4.1820

>> X.*Y

ans =
1.0000 3.1820 0

>> atan(X,Y)

??? Error using ==> atan

Too many input arguments.

>> norm(A)

ans =

16.8481

>> A

A=

1 2 3

4 5 6

7 8 9

>> norm(X)

ans =

9.0604
>> X

X=

1.0000 4.5000 7.8000

>> dot(X,Y)/(norm(X)*norm(Y))

ans =

0.3769

>> M=[Ref.art. Precio Cantidad

M=[Ref.art. Precio Cantidad]

??? M=[Ref.art. Precio Cantidad]

Error: The expression to the left of the equals sign is not a valid target for an
assignment.

>> Ref.art.=[1520 1621 1428 1429 1628]

??? Ref.art.=[1520 1621 1428 1429 1628]

Error: The expression to the left of the equals sign is not a valid target for an
assignment.

>> Refart=[1520 1621 1428 1429 1628]


Refart =

1520 1621 1428 1429 1628

>> Precio=[1146 3450 6225 7100 8500]

Precio =

1146 3450 6225 7100 8500

>> Cantidad=[200 250 150 150 100]

Cantidad =

200 250 150 150 100

>> Q=[1520 1146 200;1621 3450 250;1428 6225 150;1429 7100 150;1628
8500 100]

Q=

1520 1146 200

1621 3450 250

1428 6225 150

1429 7100 150

1628 8500 100


>> ["hola"]

??? ["hola"]

Error: The input character is not valid in MATLAB statements or expressions.

>> ['hola']

ans =

hola

>> S=['Ref.art.' 'Precio' 'Cantidad';1520 1146 200;1621 3450 250]

??? Error using ==> vertcat

CAT arguments dimensions are not consistent.

>> S=['Ref.art.' 'Precio' 'Cantidad']

S=

Ref.art.PrecioCantidad

>> S=['Ref.art.','Precio','Cantidad';1520 1146 200;1621 3450 250]

??? Error using ==> vertcat

CAT arguments dimensions are not consistent.


>> Q

Q=

1520 1146 200

1621 3450 250

1428 6225 150

1429 7100 150

1628 8500 100

>>>> A=[1 2 3;2 3 4;4 2 5]

A=

1 2 3

2 3 4

4 2 5

>> B=[4 2 1;2 0 4;1 -2 -5]

B=

4 2 1

2 0 4

1 -2 -5
>> I=[1 0 0;0 1 0;0 0 1]

I=

1 0 0

0 1 0

0 0 1

>> SA=[1 2 4;4 2 5]

SA =

1 2 4

4 2 5

>> SB=[2 1;0 4;-2 -5]

SB =

2 1

0 4

-2 -5

>> A+B

ans =
5 4 4

4 3 8

5 0 0

>> dot(A,I)

ans =

1 3 5

>> B*I

ans =

4 2 1

2 0 4

1 -2 -5

>> SA*SB

ans =

-6 -11

-2 -13
>> C=[0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46
48 50 52 54 56 58 60 62 64 68 70 72 74 76 78 80 82 84 86 88 90 92 94 96 98
100]

C=

Columns 1 through 15

0 2 4 6 8 10 12 14 16 18 20 22 24 26 28

Columns 16 through 30

30 32 34 36 38 40 42 44 46 48 50 52 54 56 58

Columns 31 through 45

60 62 64 68 70 72 74 76 78 80 82 84 86 88 90

Columns 46 through 50

92 94 96 98 100

>> F=((9*C)/5)+32

F=

Columns 1 through 9
32.0000 35.6000 39.2000 42.8000 46.4000 50.0000 53.6000
57.2000 60.8000

Columns 10 through 18

64.4000 68.0000 71.6000 75.2000 78.8000 82.4000 86.0000


89.6000 93.2000

Columns 19 through 27

96.8000 100.4000 104.0000 107.6000 111.2000 114.8000 118.4000


122.0000 125.6000

Columns 28 through 36

129.2000 132.8000 136.4000 140.0000 143.6000 147.2000 154.4000


158.0000 161.6000

Columns 37 through 45

165.2000 168.8000 172.4000 176.0000 179.6000 183.2000 186.8000


190.4000 194.0000

Columns 46 through 50

197.6000 201.2000 204.8000 208.4000 212.0000


>> K=C+273

K=

Columns 1 through 15

273 275 277 279 281 283 285 287 289 291 293 295 297 299
301

Columns 16 through 30

303 305 307 309 311 313 315 317 319 321 323 325 327 329
331

Columns 31 through 45

333 335 337 341 343 345 347 349 351 353 355 357 359 361
363

Columns 46 through 50

365 367 369 371 373

>> c=C'

c=

0
2

10

12

14

16

18

20

22

24

26

28

30

32

34

36

38

40

42

44

46

48

50

52
54

56

58

60

62

64

68

70

72

74

76

78

80

82

84

86

88

90

92

94

96

98

100

>> f=F'
f=

32.0000

35.6000

39.2000

42.8000

46.4000

50.0000

53.6000

57.2000

60.8000

64.4000

68.0000

71.6000

75.2000

78.8000

82.4000

86.0000

89.6000

93.2000

96.8000

100.4000

104.0000

107.6000

111.2000

114.8000
118.4000

122.0000

125.6000

129.2000

132.8000

136.4000

140.0000

143.6000

147.2000

154.4000

158.0000

161.6000

165.2000

168.8000

172.4000

176.0000

179.6000

183.2000

186.8000

190.4000

194.0000

197.6000

201.2000

204.8000

208.4000

212.0000
>> k=K'

k=

273

275

277

279

281

283

285

287

289

291

293

295

297

299

301

303

305

307

309

311

313
315

317

319

321

323

325

327

329

331

333

335

337

341

343

345

347

349

351

353

355

357

359

361

363

365

367
369

371

373

>> Matriz=[c f k]

Matriz =

0 32.0000 273.0000

2.0000 35.6000 275.0000

4.0000 39.2000 277.0000

6.0000 42.8000 279.0000

8.0000 46.4000 281.0000

10.0000 50.0000 283.0000

12.0000 53.6000 285.0000

14.0000 57.2000 287.0000

16.0000 60.8000 289.0000

18.0000 64.4000 291.0000

20.0000 68.0000 293.0000

22.0000 71.6000 295.0000

24.0000 75.2000 297.0000

26.0000 78.8000 299.0000

28.0000 82.4000 301.0000

30.0000 86.0000 303.0000

32.0000 89.6000 305.0000

34.0000 93.2000 307.0000


36.0000 96.8000 309.0000

38.0000 100.4000 311.0000

40.0000 104.0000 313.0000

42.0000 107.6000 315.0000

44.0000 111.2000 317.0000

46.0000 114.8000 319.0000

48.0000 118.4000 321.0000

50.0000 122.0000 323.0000

52.0000 125.6000 325.0000

54.0000 129.2000 327.0000

56.0000 132.8000 329.0000

58.0000 136.4000 331.0000

60.0000 140.0000 333.0000

62.0000 143.6000 335.0000

64.0000 147.2000 337.0000

68.0000 154.4000 341.0000

70.0000 158.0000 343.0000

72.0000 161.6000 345.0000

74.0000 165.2000 347.0000

76.0000 168.8000 349.0000

78.0000 172.4000 351.0000

80.0000 176.0000 353.0000

82.0000 179.6000 355.0000

84.0000 183.2000 357.0000

86.0000 186.8000 359.0000

88.0000 190.4000 361.0000


90.0000 194.0000 363.0000

92.0000 197.6000 365.0000

94.0000 201.2000 367.0000

96.0000 204.8000 369.0000

98.0000 208.4000 371.0000

100.0000 212.0000 373.0000

>> p=[1 -1]

p=

1 -1

>> q=conv(p,p)

q=

1 -2 1

>> q=conv(q,p)

q=

1 -3 3 -1

>> raices=roots(q)
raices =

1.0000 + 0.0000i

1.0000 - 0.0000i

1.0000

>> pr=[-0.132 5.44 -21]

pr =

-0.1320 5.4400 -21.0000

>> pr0=polyval(pr,273.15-268.25)

pr0 =

2.4867

>> pr1=3*(9.265e-6)

pr1 =

2.7795e-005

>> pr(3)=pr(3)-pr1
pr =

-0.1320 5.4400 -21.0000

>> tem=roots(pr)

tem =

36.9008

4.3113

>> format long

>> p=[1 -1 2 -2 1 -1]

p=

1 -1 2 -2 1 -1

>> raices=roots(p)

raices =

1.000000000000002

-0.000000010162287 + 1.000000003705539i

-0.000000010162287 - 1.000000003705539i

0.000000010162287 + 0.999999996294460i
0.000000010162287 - 0.999999996294460i

>> derp=polyder(p)

derp =

5 -4 6 -4 1

>> polyval(derp,round(raices(2)))

ans =

>> dsolve('D5y-D4y+2*D3y-2*D2y+Dy-y=0','x')

ans =

C6*cos(x) + C10*exp(x) + C8*sin(x) + C9*x*sin(x) + C7*x*cos(x)

>> numerador=[1 0 0 2 1]

numerador =

1 0 0 2 1

>> denominador=[1 -1]


denominador =

1 -1

>> [cociente,resto]=deconv(numerador,denominador)

cociente =

1 1 1 3

resto =

0 0 0 0 4

>> I=int('(x^4+2*x+1)/(x-1)')

I=

3*x + 4*log(x - 1) + x^2/2 + x^3/3 + x^4/4

>>

You might also like