Vous êtes sur la page 1sur 9

>> A= linspace (1,10,2)

A=

1 10

>> A= linspace (1,10,5)

A=

1.0000 3.2500 5.5000 7.7500 10.0000

>> A= linspace (1,10,5)

A=

1.0000 3.2500 5.5000 7.7500 10.0000

>> eye ( 4.6)

Error using eye

Size inputs must be integers.

>> B= eye (4,6)

B=

1 0 0 0 0 0

0 1 0 0 0 0

0 0 1 0 0 0

0 0 0 1 0 0
>> zeros (6,3)

ans =

0 0 0

0 0 0

0 0 0

0 0 0

0 0 0

0 0 0

>> ones (6,3)

ans =

1 1 1

1 1 1

1 1 1

1 1 1

1 1 1

1 1 1

>> ones (2,3)

ans =

1 1 1

1 1 1

>> limpace (5,9,41)


Undefined function or variable 'limpace'.

>> linspace(5,9,41)

ans =

Columns 1 through 8

5.0000 5.1000 5.2000 5.3000 5.4000 5.5000 5.6000 5.7000

Columns 9 through 16

5.8000 5.9000 6.0000 6.1000 6.2000 6.3000 6.4000 6.5000

Columns 17 through 24

6.6000 6.7000 6.8000 6.9000 7.0000 7.1000 7.2000 7.3000

Columns 25 through 32

7.4000 7.5000 7.6000 7.7000 7.8000 7.9000 8.0000 8.1000

Columns 33 through 40

8.2000 8.3000 8.4000 8.5000 8.6000 8.7000 8.8000 8.9000

Column 41

9.0000

>> rand(3)*10
ans =

8.1472 9.1338 2.7850

9.0579 6.3236 5.4688

1.2699 0.9754 9.5751

>> 5+rnd(3)*10

Undefined function or variable 'rnd'.

Did you mean:

>> 5+rand(3)*10

ans =

14.6489 14.5717 6.4189

6.5761 9.8538 9.2176

14.7059 13.0028 14.1574

>> 5+rand(3)*10

ans =

12.9221 5.3571 11.7874

14.5949 13.4913 12.5774

11.5574 14.3399 12.4313

>> 5+rand(3)*10

ans =
8.9223 12.0605 5.4617

11.5548 5.3183 5.9713

6.7119 7.7692 13.2346

>> magic(3)

ans =

8 1 6

3 5 7

4 9 2

>> t=[9 6;4 5;8 3]

t=

9 6

4 5

8 3

>> y= [6 3;9 4;5 3]

y=

6 3

9 4

5 3

>> t=y'

t=
6 9 5

3 4 3

>> U=trace(y)

Error using trace (line 12)

Matrix must be square.

>> y= [6 3;9 4;5 3]

y=

6 3

9 4

5 3

>> U=trace(y)

Error using trace (line 12)

Matrix must be square.

>>

>> A=[7 5;8 6]

A=

7 5

8 6

>> B=[6 8;2 3]

B=
6 8

2 3

>> B=A'

B=

7 8

5 6

>> U=trace(A)

U=

13

>> O=[8 9;7 5;6 9]

O=

8 9

7 5

6 9

>> Y=[1 2 3 4 5 6;7 8 9 10 11 12;13 14 15 16 17 18;19 20 21 22 23 24;25 26 27 28 29 30;31 32


33 34 35 36]

Y=

1 2 3 4 5 6
7 8 9 10 11 12

13 14 15 16 17 18

19 20 21 22 23 24

25 26 27 28 29 30

31 32 33 34 35 36

>> K=[1:6;7:12;13:18;19:24;25:30;31:36]

K=

1 2 3 4 5 6

7 8 9 10 11 12

13 14 15 16 17 18

19 20 21 22 23 24

25 26 27 28 29 30

31 32 33 34 35 36

>> B=K(1:2 , 3:5)

B=

3 4 5

9 10 11

>> C=K(3:5 , [2,4])

C=
14 16

20 22

26 28

>> D=[K(1:2 , 1:2);K(5:6 , 5:6)]

D=

1 2

7 8

29 30

35 36

>> C=K(3:5,[2,4])

C=

14 16

20 22

26 28

>>

Vous aimerez peut-être aussi