Вы находитесь на странице: 1из 8

>> 1+3

ans =

>> 2^3

ans =

>> ans

ans =

>> x=12+80

x=

92

>> total=12.5*10-3.2
total =

121.8000

>> otro=12.2531*120.1

otro =

1.4716e+003

>> lado1=3

lado1 =

>> lado2=4

lado2 =

>> hipo=sqrt(ladio1^2+lado2^)

??? hipo=sqrt(ladio1^2+lado2^)

Error: Unbalanced or unexpected parenthesis or bracket.


>> hipo=sqrt(lado1^2+lado2^2)

hipo =

>> hipo=sqrt(ladio1^2+lado2^)

??? hipo=sqrt(ladio1^2+lado2^)

Error: Unbalanced or unexpected parenthesis or bracket.

>> hipo=sqrt(ladio1^2+lado2^)

??? hipo=sqrt(ladio1^2+lado2^)

Error: Unbalanced or unexpected parenthesis or bracket.

>> disp(lado1)

>> disp([lado1,lado2,hipo])

3 4 5

>>
>> clear ans

>> clear otro total

>> clear all

>> x=[2 4 6 8 10]


x=

2 4 6 8 10

>> y=2*x

y=

4 8 12 16 20

>> suma=x+y

suma =

6 12 18 24 30

>> resta=x-y;

>> x

x=

2 4 6 8 10

>> x'
ans =

10

>> cx=x'

cx =

10

>>

>> resta

resta =

-2 -4 -6 -8 -10

>> cresta=resta';
>> cresta'

ans =

-2 -4 -6 -8 -10

>> disp([x',y',suma'])

2 4 6

4 8 12

6 12 18

8 16 24

10 20 30

>> resta

resta =

-2 -4 -6 -8 -10

cresta=resta';

cresta'

ans =

-2 -4 -6 -8 -10
disp([x',y',suma'])

2 4 6

4 8 12

6 12 18

8 16 24

10 20 30

Вам также может понравиться