Documente Academic
Documente Profesional
Documente Cultură
a=
-1
-8
-2
b=
7 -21
15
b=
7
-21
15
>> x=a\b
x=
2
4
3
>> x=inv(a)*b
x=
2.0000
4.0000
3.0000
x=
x=
y=
z=
c=
-2
-3
-9
d=
12
10
24
>> d=d'
d=
12
10
24
>> y=c\d
Warning: Matrix is singular to working precision.
y=
NaN
-Inf
Inf
>> y=inv(c)*d
Warning: Matrix is singular to working precision.
y=
Inf
Inf
Inf
>> y=rref([c,d])
y=
1.0000
0 -0.2000
1.0000
2.6000
0
0
0
1.0000
>> [x1,x2,x3]=solve('-2*x1+x2+3*x3=12','x1+2*x2+5*x3=10','6*x1-3*x29*x3=24','x','x2','x3')
Warning: Explicit solution could not be found.
> In solve at 179
x1 =
[ empty sym ]
x2 =
[]
x3 =
[]
e=
-5
-1
-2
f=
-8
>> f=f'
f=
0
-8
-7
-7
>> z=e\f
z=
2.0000
-3.0000
0.0000
>> z=inv(e)*f
z=
2.0000
-3.0000
0.0000
>> z=rref([e,f])
z=
-3
>> [x1,x2,x3]=solve('3*x1+2*x2-5*x3=0','-1*x1+2*x2+1*x3=10','2*x1+1*x2+1*x3=24','x','x2','x3')
Warning: Explicit solution could not be found.
> In solve at 179
x1 =
[ empty sym ]
x2 =
[]
x3 =
[]
>> [x1,x2,x3]=solve('3*x1+2*x2-5*x3=0','-1*x1+2*x2+1*x3=-8','2*x1+1*x2+1*x3=-7','x','x2','x3')
Warning: Explicit solution could not be found.
> In solve at 179
x1 =
[ empty sym ]
x2 =
[]
x3 =
[]
>> [x,y]=meshgrid(-5:0.2:10);
>> z=(-2*x+y-12)/3;
>> surf(x,y,z)
>> old on
Undefined function 'old' for input arguments of type 'char'.
>> char(64)
ans =
ans =
>> char(91)
ans =
>> double('mario')
ans =
109
ans =
77
65
82
73
79
>> lower('MARIOANGEL')
ans =
marioangel
ans =
JULIACA
c2 =
hola
>> strcmp(c1,c2)
Undefined function or variable 'c1'.
>> c2='HOLA'
c2 =
HOLA
>> strcmp(c1,c2)
Undefined function or variable 'c1'.
>> c1='HOLA'
c1 =
HOLA
>> strcmp(c1,c2)
ans =
c3 =
MARIO
>> c4='angel'
c4 =
angel
>> strcmpi(c3,c4)
ans =
>> c3='MARIooo'
c3 =
MARIooo
>> strcmpi(c3,c4)
ans =
ans =
296
ans =
295
ans =
296
ans =
ans =
>> rem(25,7)
ans =
ans =
ans =
>> j=char('flor','dina','maria','ruth')
j=
flor
dina
maria
ruth
e=
19
20
23
18
>> e=e'
e=
19
20
23
18
>> t=[j,e]
t=
flor
dina
maria
ruth
e=
19
20
23
18
>> j=char('flor','dina','maria','ruth')
j=
flor
dina
maria
ruth
>> e1=e1'
Undefined function or variable 'e1'.
>> j=char('flor','dina','maria','ruth')
j=
flor
dina
maria
ruth
e=
19
20
23
18
>> e=num2str(e)
e=
19 20 23 18
>> e=e'
e=
1
9
2
0
2
3
1
8
>> clear
>> j=char('flor','dina','maria','ruth')
j=
flor
dina
maria
ruth
e=
19
20
23
18
>> j=char('flor','dina','maria','ruth')
j=
flor
dina
maria
ruth
>> e=[1;2;3;4]
e=
1
2
3
4
>> e1=mun2str(e)
Undefined function 'mun2str' for input arguments of type 'double'.
>> e1=num2str(e)
e1 =
1
2
3
4
>> tablita=[j,e1]
tablita =
flor 1
dina 2
maria3
ruth 4
>>