Академический Документы
Профессиональный Документы
Культура Документы
ans =
'02-Apr-2019'
clc
A=[pi 0;pi/3 pi/2]
A =
3.1416 0
1.0472 1.5708
find(A)
ans =
1
2
4
ans =
0 3.1416
1.5708 1.0472
ans =
1.0472 1.5708
3.1416 0
ans =
3.1416 0
1.0472 1.5708
A =
3.1416 0
1.0472 1.5708
B=ones(3,2)
B =
1 1
1 1
1 1
reshape(B,2,2)
{ Error using <a
href="matlab:matlab.internal.language.introspective.errorDocCallback('res
hape')" style="font-weight:bold">reshape</a>
To RESHAPE the number of elements must not change.
}
reshape(B,3,2)
ans =
1 1
1 1
1 1
B=eye(3,2)
B =
1 0
0 1
0 0
reshape(B,3,2)
ans =
1 0
0 1
0 0
reshape(B,2,3)
ans =
1 0 1
0 0 0
A =
3.1416 0
1.0472 1.5708
reshape(A,2,2)
ans =
3.1416 0
1.0472 1.5708
A =
3.1416 0
1.0472 1.5708
A =
3.1416 0
1.0472 1.5708
rot90(A)
ans =
0 1.5708
3.1416 1.0472
ans =
1.0472 3.1416
1.5708 0
ans =
23.1407 0
12.2201 4.8105
A =
3.1416 0
1.0472 1.5708
ans =
1.1447 0
0.4621 0.4516
ans =
1.7725 0
0.3461 1.2533
ans =
0.0000 0
-0.6667 1.0000
A =
0 0 0
0 0 0
A=ones(2,3)
A =
1 1 1
1 1 1
A=zeros(2,3)
A =
0 0 0
0 0 0
B=zeros(2,3)
B =
0 0 0
0 0 0
B=ones(2,3)
B =
1 1 1
1 1 1
cat(1,A,B)
ans =
0 0 0
0 0 0
1 1 1
1 1 1
cat(2,A,B)
ans =
0 0 0 1 1 1
0 0 0 1 1 1
cat(3,A,B)
ans(:,:,1) =
0 0 0
0 0 0
ans(:,:,2) =
1 1 1
1 1 1
a='casa'
a =
'casa'
whos
Name Size Bytes Class Attributes
A 2x3 48 double
B 2x3 48 double
a 1x4 8 char
ans 2x3x2 96 double
b='gato'
b =
'gato'
a+b
ans =
a+0
ans =
99 97 115 97
b+0
ans =
abs(a)
ans =
99 97 115 97
double(a)
ans =
99 97 115 97
setstr(a)
ans =
'casa'
abs('a')-abs('A')
ans =
32
setstr(a-32)
ans =
'CASA'
disp(a)
casa
whos
Name Size Bytes Class Attributes
A 2x3 48 double
B 2x3 48 double
a 1x4 8 char
ans 1x4 8 char
b 1x4 8 char
estudiante =
nombre: 'Alexander'
estudiante =
nombre: 'Alexander'
apellido1: 'Viracucha'
estudiante =
nombre: 'Alexander'
apellido1: 'Viracucha'
apellido2: 'Mosquera'
estudiante.peso='70'
estudiante =
nombre: 'Alexander'
apellido1: 'Viracucha'
apellido2: 'Mosquera'
peso: '70'
estudiante.edad='22'
estudiante =
nombre: 'Alexander'
apellido1: 'Viracucha'
apellido2: 'Mosquera'
peso: '70'
edad: '22'
ciudadano(1)=struct('name','Mateo','lastname1','Viracucha','lastname2','M
osquera','weight','50','age','17')
ciudadano =
name: 'Mateo'
lastname1: 'Viracucha'
lastname2: 'Mosquera'
weight: '50'
age: '17'
ciudadano(2)=struct('name','Christian','lastname1','Viracucha','lastname2
','Mosquera','weight','48','age','10')
ciudadano =
name
lastname1
lastname2
weight
age
ciudadano(1)
ans =
name: 'Mateo'
lastname1: 'Viracucha'
lastname2: 'Mosquera'
weight: '50'
age: '17'
ciudadano(2)
ans =
name: 'Christian'
lastname1: 'Viracucha'
lastname2: 'Mosquera'
weight: '48'
age: '10'
ciudadano()
ans =
name
lastname1
lastname2
weight
age
ciudadano.age()
{ Expected one output from a curly brace or dot indexing expression, but
there
were 2 results.
}
ciudadano.age
ans =
'17'
ans =
'10'
isfield(ciudadano)
{ Error using <a
href="matlab:matlab.internal.language.introspective.errorDocCallback('isf
ield')" style="font-weight:bold">isfield</a>
Not enough input arguments.
}
isfield(ciudadano,'weight')
ans =
<a href="matlab:helpPopup logical" style="font-weight:bold">logical</a>
isstruct(ciudadano)
ans =
isstruct(estudiante)
ans =
rmfield('ciudadano','apellido2')
{ Error using <a
href="matlab:matlab.internal.language.introspective.errorDocCallback('rmf
ield', 'C:\Program
Files\MATLAB\R2017b\toolbox\matlab\datatypes\rmfield.m', 19)"
style="font-weight:bold">rmfield</a> (<a href="matlab:
opentoline('C:\Program
Files\MATLAB\R2017b\toolbox\matlab\datatypes\rmfield.m',19,0)">line
19</a>)
S must be a structure array.
}
rmfield('ciudadano','lastname2')
{ Error using <a
href="matlab:matlab.internal.language.introspective.errorDocCallback('rmf
ield', 'C:\Program
Files\MATLAB\R2017b\toolbox\matlab\datatypes\rmfield.m', 19)"
style="font-weight:bold">rmfield</a> (<a href="matlab:
opentoline('C:\Program
Files\MATLAB\R2017b\toolbox\matlab\datatypes\rmfield.m',19,0)">line
19</a>)
S must be a structure array.
}
rmfield(ciudadano,'lastname2')
ans =
name
lastname1
weight
age
rmfield(ciudadano,'lastname2') borra un campo
rmfield(ciudadano,'lastname2') borra un campo
ans =
{'nombre' }
{'apellido1'}
{'apellido2'}
{'peso' }
{'edad' }
ans =
name
lastname1
lastname2
weight
age
clc
cel{1}=[1 2 3 4]
cel =
{1×4 double}
cel{2}={'escuela politecnica'}
cel =
cel =
cel{3}=eye(4)
cel =
cel{4}=-pi
cel =
ce =
celldisp(cel)
cel{1} =
1 2 3 4
cel{2} =
escuela politecnica
cel{3} =
1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1
cel{4} =
-3.1416
cellplot(cel)
cellplot(ce)
cellplot(ce)
cellplot(cel)
cell(2,)
cell(2,)
ans =
A =
0 0 0
0 0 0
A=eye(5)
A =
1 0 0 0 0
0 1 0 0 0
0 0 1 0 0
0 0 0 1 0
0 0 0 0 1
num2cell(A)
ans =
iscell(cel)
ans =
clc
x=[1:8]
x =
1 2 3 4 5 6 7 8
y=8-x
y =
7 6 5 4 3 2 1 0
r=x>6
r =
0 0 0 0 0 0 1 1
q =
0 0 0 1 0 0 0 0
t =
1 1 1 0 1 1 1 1
t=x!=y
t=x!=y
t =
1 1 1 0 1 1 1 1
v=(x>y)&(y>-3)
v =
0 0 0 0 1 1 1 1
k =
exist('k')
ans =
ans =
0 1 0 0 0 0
ans =
1 0 0 0 0 0
ans =
clc
x=[1 5 4]
x =
1 5 4
y=[3 8 9]
y =
3 8 9
x =
1 5 4
plot(x)
c=conv(x,y)
c =
3 23 61 77 36
ans =
0 0 0.3333 -0.5556
deconv(c,y)
ans =
1 5 4
whos
Name Size Bytes Class Attributes
c =
3 23 61 77 36
polyder(c)
ans =
12 69 122 77
ans =
12 69 122 77
ans =
1680
diary off