Está en la página 1de 14

TRABAJO 2

SOFTWARE PARA INGENIERIA

GRUPO:

203040_2

TUTOR:
JAIRO ANTONIO GARCIA BARRETO

UNIVERSIDAD NACIONAL ABIERTA Y A DISTANCIA (UNAD).


ESCUELA DE CIENCIAS BÁSICAS, TECNOLOGÍA E INGENIERÍA
INTRODUCCION

En la realización del ejercicio propuestos se amplía las posibilidades para el desarrollo del
problema general de la conversión de palabras del alfabeto a braille, hemos aprendido con
la realización de este ejercicio las diferentes instrucciones que maneja Matlab para la
manipulación de las matrices las cuales nos han servido para modificar las formas de las
matrices para indicar el alfabeto en Braille
1. Algoritmo (diagrama de flujo ó pseudocódigo) de la solución del
problema planteado, debidamente comentado

INICIO

1) Ingresar la palabra a
representar en Braille.
2) Ingresar la letra para
mostrar la imagen.
3) Selección para
exportación de las letras
de antes y después

Seleccionaste NO
la 1
Seleccionaste
la 2
NO
Seleccionaste
SI
la 3
Realiza una comparación SI
con una instrucción If y
representa la palabra en Realiza una comparación
Braille con una matriz de con una instrucción If y
SI
2x3 selecciona la letra
mostrando la imagen en Realiza una comparación
pantalla e indica la letra antes y
después de la
seleccionada

FIN
2. Código fuente de la solución del problema, debidamente comentado
1. Código fuente de la solución del problema, debidamente comentado

Limpiar pantalla%
z=char;
%--------------MENU PARA SELECCIONAR LAS OPCIONES------------%
fprintf('_______________________MENU_______________________\n')
fprintf('1) Ingresar la palabra a representar en Braille \n\n')
fprintf('2) Ingresar la letra para mostrar la imagen \n\n')
fprintf('3) Seleccion para exportacion de las letras de antes y despues
\n\n')
h=input('Por favor seleccione la opcion \n');

switch h

case 1
fprintf('1) Ingresar cuantas letras tiene la palabra \n\n')
m=input('Ingrese el numero de letras que tiene la palabra \n');
n=1;

% ----SOLICITA LA CANTIDAD DE LETRAS QUE TIENE LA PALABRA A INGRESAR


for i=1:m
for j=1:n

disp(['El elemento (',num2str(i),',',num2str(j),')'])

A(i,j) = input('','s');
end
end
sumar=1;
x=uint8(A) %CONVIERTE A NUMERO EL CARACTER INGRESADO

%REALIZA LAS COMPARACIONES PARA IDENTIFICAR QUETIPO DE LATRA INGRESO--

for g=1:1:m
if (A(sumar)==97); %A
d=[1,0;0,0;0,0]
sumar=sumar+1; % INCREMENTA EEL NUMERO DEL VECTOR PARA REALIZAR
TODAS
% LAS LETRAS INGRESADAS
end
if (A(sumar)==98); %B
d=[1,0;1,0;0,0];
sumar=sumar+1;
end
if (A(sumar)==99); %C
d=[1,1;0,0;0,0]
sumar=sumar+1;
end
if (A(sumar)==100); %D
d=[1,1;0,1;0,0]
sumar=sumar+1;
end
if (A(sumar)==101); %E
d=[1,0;0,1;0,0]
sumar=sumar+1;
end
if (A(sumar)==102); %F
d=[1,1;1,0;0,0]
sumar=sumar+1;
end
if (A(sumar)==103); %G
d=[1,1;1,1;0,0]
sumar=sumar+1;
end
if (A(sumar)==104); %H
d=[1,0;1,1;0,0]
sumar=sumar+1;
end
if (A(sumar)==105); %I
d=[0,1;1,0;0,0]
sumar=sumar+1;
end
if (A(sumar)==106); %J
d=[0,1;1,1;0,0]
sumar=sumar+1;
end
if (A(sumar)==107); %K
d=[1,0;0,0;1,0]
sumar=sumar+1;
end
if (A(sumar)==108); %L
d=[1,0;1,0;1,0]
sumar=sumar+1;
end
if (A(sumar)==109); %M
d=[1,1;0,0;1,0]
sumar=sumar+1;
end
if (A(sumar)==110); %N
d=[1,1;0,1;1,0]
sumar=sumar+1;
end
if (A(sumar)==111); %Ñ
d=[1,1;1,1;0,1]
sumar=sumar+1;
end
if (A(sumar)==112); %O
d=[1,0;0,1;1,0]
sumar=sumar+1;
end
if (A(sumar)==113); %P
d=[1,1;1,0;1,0]
sumar=sumar+1;
end
if (A(sumar)==114); %Q
d=[1,1;1,1;1,0]
sumar=sumar+1;
end
if (A(sumar)==115); %R
d=[1,0;1,1;1,0]
sumar=sumar+1;
end
if (A(sumar)==116); %S
d=[0,1;1,0;1,0]
sumar=sumar+1;
end
if (A(sumar)==117); %T
d=[0,1;1,1;1,0]
sumar=sumar+1;
end
if (A(sumar)==118); %U
d=[1,0;0,0;1,1]
sumar=sumar+1;
end
if (A(sumar)==119); %V
d=[1,0;1,0;1,1]
sumar=sumar+1;
end
if (A(sumar)==120); %W
d=[0,1;1,1;0,1]
sumar=sumar+1;
end
if (A(sumar)==121); %X
d=[1,1;0,0;1,1]
sumar=sumar+1;
end
if (A(sumar)==122); %y
d=[1,1;0,1;1,1]
sumar=sumar+1;
end
if (A(sumar)==123); %Z
d=[1,0;0,1;1,1]
sumar=sumar+1;
end
end

%---------- ES LA OPCION DOS DEL MENU


case 2
u=input('Ingrese la letra a mostrar en la imagen \n','s');

% LEE LAS IMAGENES DE LA LETRA EN LA UBICACION DE DESTINO

letraA=imread('C:\Users\Acer_core_i5\Desktop\letras\letraA','jpg');
letraB=imread('C:\Users\Acer_core_i5\Desktop\letras\letraB','jpg');
letraC=imread('C:\Users\Acer_core_i5\Desktop\letras\letraC','jpg');
letraD=imread('C:\Users\Acer_core_i5\Desktop\letras\letraD','jpg');
letraE=imread('C:\Users\Acer_core_i5\Desktop\letras\letraE','jpg');
letraF=imread('C:\Users\Acer_core_i5\Desktop\letras\letraF','jpg');
letraG=imread('C:\Users\Acer_core_i5\Desktop\letras\letraG','jpg');
letraH=imread('C:\Users\Acer_core_i5\Desktop\letras\letraH','jpg');
letraI=imread('C:\Users\Acer_core_i5\Desktop\letras\letraI','jpg');
letraJ=imread('C:\Users\Acer_core_i5\Desktop\letras\letraJ','jpg');
letraK=imread('C:\Users\Acer_core_i5\Desktop\letras\letraK','jpg');
letraL=imread('C:\Users\Acer_core_i5\Desktop\letras\letraL','jpg');
letraM=imread('C:\Users\Acer_core_i5\Desktop\letras\letraM','jpg');
letraN=imread('C:\Users\Acer_core_i5\Desktop\letras\letraN','jpg');
letraNN=imread('C:\Users\Acer_core_i5\Desktop\letras\letraNN','jpg');
letraO=imread('C:\Users\Acer_core_i5\Desktop\letras\letraO','jpg');
letraP=imread('C:\Users\Acer_core_i5\Desktop\letras\letraP','jpg');
letraQ=imread('C:\Users\Acer_core_i5\Desktop\letras\letraQ','jpg');
letraR=imread('C:\Users\Acer_core_i5\Desktop\letras\letraR','jpg');
letraS=imread('C:\Users\Acer_core_i5\Desktop\letras\letraS','jpg');
letraT=imread('C:\Users\Acer_core_i5\Desktop\letras\letraT','jpg');
letraU=imread('C:\Users\Acer_core_i5\Desktop\letras\letraU','jpg');
letraV=imread('C:\Users\Acer_core_i5\Desktop\letras\letraV','jpg');
letraW=imread('C:\Users\Acer_core_i5\Desktop\letras\letraW','jpg');
letraX=imread('C:\Users\Acer_core_i5\Desktop\letras\letraX','jpg');
letraY=imread('C:\Users\Acer_core_i5\Desktop\letras\letraY','jpg');
letraZ=imread('C:\Users\Acer_core_i5\Desktop\letras\letraZ','jpg');

% ---REALIZA LA COMPARACIONDE LA LETRA INGRESADA Y SACA LA IMAGEN


% EQUIVALENTE
if (u==97); %A
imshow(letraA); %INSTRUCCION PARA MOSTRAR LA IMAGEN
end
if (u==98); %B
imshow(letraB)
end
if (u==99); %C
imshow(letraC)
end
if (u==100); %D
imshow(letraD)
end
if (u==101); %E
imshow(letraE)
end
if (u==102); %F
imshow(letraF)
end
if (u==103); %G
imshow(letraG)
end
if (u==104); %H
imshow(letraH)
end
if (u==105); %I
imshow(letraI)
end
if (u==106); %J
imshow(letraJ)
end
if (u==107); %K
imshow(letraK)
end
if (u==108); %L
imshow(letraL)
end
if (u==109); %M
imshow(letraM);
end
if (u==110); %N
imshow(letraN)
end
if (u==111); %Ñ
imshow(letraNN)
end
if (u==112); %O
imshow(letraO)
end
if (u==113); %P
imshow(letraP)
end
if (u==114); %Q
imshow(letraQ)
end
if (u==115); %R
imshow(letraR)
end
if (u==116); %S
imshow(letraS);
end
if (u==117); %T
imshow(letraT)
end
if (u==118); %U
imshow(letraU)
end
if (u==119); %V
imshow(letraV)
end
if (u==120); %W
imshow(letraW)
end
if (u==121); %X
imshow(letraX)
end
if (u==122); %y
imshow(letraY)
end
if (u==123); %Z
imshow(letraZ)
end

end
3. Capturas de pantalla del funcionamiento del aplicativo, debidamente
comentadas
Conclusiones

En la realización de este trabajo reforzamos nuestra idea de la realización del


problema general de convertir el alfabeto a braille, teniendo presente las
instrucciones para el movimiento de columnas y filas de las matrices
El análisis resultado del trabajo no ha sido completo ya que está pendiente el punto
3 del menú.
Referencias bibliográficas

 https://la.mathworks.com/videos/getting-started-with-matlab-68985.html

 https://www.youtube.com/watch?v=mUrHNtekyng

También podría gustarte