Professional Documents
Culture Documents
4 To Lab
4 To Lab
1.
function [pf]=f1(p)
igv=0.18;
pf=p*(1+igv);
end
2.
function [y]=f2(n)
x=-n:0.1:n;
y=x.^2;
plot(x,y);
grid;
end
3.
function [y]=f1(p)
x=-p:0.1:p;
y=x.^p;
plot(x,y);
grid;
end
1. untecs256=imread('F:\Penguins.jpg')
untecs256=im2double(untecs256)
2. imshow(untecs256)
3. untecs128=untecs256(1:2:end,1:2:end,1:1:end)
imshow(untecs128)
4. untecs128=untecs256(1:3:end,1:3:end,1:1:end)
imshow(untecs128)
5. untecs128=untecs256(1:6:end,1:6:end,1:1:end)
imshow(untecs128)
untecs128=untecs256(1:6:end,1:3:end,1:1:end)
imshow(untecs128)
Funcin Replica
TAREA
1. A) Permetro de una circunferencia
function p=permetro(r)
p=2*3.1416*r;
end
B)
function [h]=pase(a,x)
switch x
case 1,
h=dec2bin(a);
case 2,
d=bin2dec(a);
h=dec2hex(d);
case 3,
h=dec2hex(a);
case 4,
h=hex2dec(a);
case 5,
h=bin2dec(a);
end
6.