You are on page 1of 22

VELAZQUE VELAZQUE, YIMI 2014

Realizar un programa se tiene un polígono de 4 lados que si se cálculos tres


ángulos y sus lados respectivos ¿hallar un Angulo que falta y la distancia del punto
de partida con el punto de llegada?

Se dibuja un poligonal de 4 lados imaginariamente como:

Como ya se tiene la figura:

Sea el

20 de noviembre de 2014
Sea el

Sea el

El Angulo a conocer sea

La distancia del punto de partida al punto de llegar: sea D

Demos los ángulos conocidos sea:


VELAZQUE VELAZQUE, YIMI 2014

En caso de distancia:

Consideramos conocer:

A=60m

B=50m

C=40m

D= ¿?

Sumamos los angulos:

Suma < i = 180(n-2)

.n=4

Suma < i =360

Suma < i =

20 de noviembre de 2014
Suma < I = 360 = 71+90+75 +

Para hallar distancia pedido es

A = ((c-a)2+ (d+b)2)1/2

B = ((e-c)2+ (f+d)2)1/2

C = ((g-e)2+ (h+f)2)1/2
VELAZQUE VELAZQUE, YIMI 2014

D =((a-g)2+ (b+h)2)1/2

Como se tomó los datos a ingresar

602 = c2+a2+d2+b2-2(ca+ bd)

502 =c2+e2+f2+d2 -2(ec+fd)

402 = g2+e2+h2+f2 - 2(ge+hf)

D2=a2+g2+b2+h2 - 2(ag+bh)

Dónde: sumamos

7700+D2 = 2( c2+a2+d2+b2+e2+f2+h2)-2((ca+bd)+(ec-fd)+(ge+hf)+(ag+bh))


a  (c  a , d  b )

b  ( g  a , h  b)

c  (a  c , b  d )

d  (e  c , f  d )

e  (c  e , d  f )

f  (g  e , h  f )

20 de noviembre de 2014
Para ángulos


a.b  ab cos 

a.b  0

c .d  cd cos 

e. f  ef cos 

g.h  gh cos 

(c-a).(g-a) + (d-b) (h-b)= 60*D cos71


VELAZQUE VELAZQUE, YIMI 2014

(a-c) (e-c) + (b-d) (f-d) = 60*50 cos75

(c-e) (g-h) + (d-f) (h-f)= 50*40 cos 90

LO QUE NOS PIDEN CALCULAR CON LADOS Y ANGULOS

20 de noviembre de 2014
1.- (CODIGO DE CALCULAR)

unction pushbutton1_Callback(hObject, eventdata, handles)


% hObject handle to pushbutton1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)

a=get(handles.edit1,'string');
b=get(handles.edit2,'string');
c=get(handles.edit3,'string');

A=str2double(a);
B=str2double(b);
C=str2double(c);
%%%%%%%%%%%%%%%%%%
d=get(handles.edit4,'string');
e=get(handles.edit5,'string');
f=get(handles.edit6,'string');
VELAZQUE VELAZQUE, YIMI 2014

D=str2double(d);
E=str2double(e);
F=str2double(f);

%%%%%%%%PARA EL ANGULO PEDIDOS%%%%%%%%%%%%%%5


w=(360-(A+B+C))
set(handles.edit7,'string',w)
%%%%%%%%%%%%%%%%APLICAMOS LEY DE COSENO %%%%%%%%%%%%%%%%55
%Y=sqrt(E^2+F^2)
Y=sqrt(E^2+F^2-2*E*F*cos(C*pi/180));
%%%%%%%%%%%%%PLICAMOS LEY DE COSENOS%%%%%%%%%%55
%v=atan(F/E)*180/pi
v=(asin(F*(sin(C*pi/180))/(Y)))*(180/pi);
s=(B-v);
%%%%%%%%%%%%%%%HALLANO LA DISTANCIN D %%%%%%%%%%%%%%%%

x=sqrt(D^2+Y^2-2*D*Y*cos(s*pi/180))

set(handles.edit8,'string',x)

2.-

function pushbutton3_Callback(hObject, eventdata, handles)


% hObject handle to pushbutton3 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
set(handles.edit1,'string','');
set(handles.edit2,'string','');
set(handles.edit3,'string','');
set(handles.edit4,'string','');
set(handles.edit5,'string','');
set(handles.edit5,'string','');
set(handles.edit7,'string','');
set(handles.edit8,'string','');

3.-

20 de noviembre de 2014
function pushbutton4_Callback(hObject, eventdata, handles)
delete(handles.figure1)
VELAZQUE VELAZQUE, YIMI 2014

Es el para encontrar las diferentes alturas que se encuentran los puntos

Es para determinar la cota de uno o más puntos con una sola estación

Es la sucesión de mediciones simples, con puntos auxiliares, se utiliza para


nivelación de gran longitud para terrenos de desnivel complejo y cuando es
visible el punto a nivelar.

Este método se utiliza cuando se desea comprobar si el eje óptico del anteojo del
nivel o paralelo a la bisectriz del nivel tubular, no es posible colocar el
instrumento en un lugar intermedio entre dos puntos de mira ya se a por que se
interponga un rió, pantano o cualquier otro obstáculo.

20 de noviembre de 2014
Es cuando solo es desnivel entre los puntos de la zona de trabajo, para ello se
asume una cota arbitraria a uno de los puntos, lo suficientemente grade para no
tener en el itineraria nivelación con cotas negativas o bien al punto más bajo se
le da cota cero.
VELAZQUE VELAZQUE, YIMI 2014

Cuando sea preciso trabajar con cotas precisas se ubica el B.M de un punto
cercano a la zona de trabajo y luego se realiza la nivelación de la misma zona de
trabajo.

Es un instrumento que tiene como finalidad el traslado de cotas de un punto


conocido a otro desconocido.

20 de noviembre de 2014
VELAZQUE VELAZQUE, YIMI 2014

En el apuro por nivelar rápido (sobre todo si se está en el medio de una

avenida o lugar peligroso) no calar el equipo. Este error es complicado de

detectar si las distancias en las que se niveló son parecidas.

Si se lee sobre una pared, no fijarse si la cinta o el metro está hacia arriba
o hacia abajo.

 Se hizo una nivelación compuesta partiendo del punto A de zA=53.191msnm ¿hallar la cota
de B ?
Solución:
Como la ZA=53.191

20 de noviembre de 2014
La cota de ZB=53.191+1.655-0.735
ZB=54.111

 La cota de C
La cota de Zc=54.111+1.795-1.520
VELAZQUE VELAZQUE, YIMI 2014

Pseudocódigo

Inicio

N=str2double(get(handles.puntos,'string'));
function puntos_Callback(hObject, eventdata, handles)

N=str2double(get(handles.puntos,'string'));
celda=cell(N,2);
celda(:,:)={''};
set(handles.tabla2,'Data',celda);
set(handles.tabla2,'ColumnEditable',true(1,2));

% N=str2double(get(handles.puntos,'string'));

20 de noviembre de 2014
% celda1=cell(N,2);
% celda1(:,2)=('');
% set(handles.tabla2,'Data',celda1);

% --- Executes during object creation, after setting all properties.


function puntos_CreateFcn(hObject, eventdata, handles)
% hObject handle to puntos (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns
called

% Hint: edit controls usually have a white background on Windows.


% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
VELAZQUE VELAZQUE, YIMI 2014

function edit2_Callback(hObject, eventdata, handles)


% hObject handle to edit2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit2 as text


% str2double(get(hObject,'String')) returns contents of edit2 as a
double

% --- Executes during object creation, after setting all properties.


function edit2_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns
called

% Hint: edit controls usually have a white background on Windows.


% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end

function edit3_Callback(hObject, eventdata, handles)


% hObject handle to edit3 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit3 as text


% str2double(get(hObject,'String')) returns contents of edit3 as a
double

20 de noviembre de 2014
% --- Executes during object creation, after setting all properties.
function edit3_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit3 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns
called

% Hint: edit controls usually have a white background on Windows.


% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end

% --- Executes on button press in ejecutar.


VELAZQUE VELAZQUE, YIMI 2014

function ejecutar_Callback(hObject, eventdata, handles)

N=str2double(get(handles.puntos,'string'));
ci=str2double(get(handles.edit2,'string'));
%cf=str2double(get(handles.edit3,'string'));
c=str2double(get(handles.tabla2,'data'));

vat=c(:,1)' %primera columna


vad=c(:,2)' % segunda coluna

for I=1:N
va=c(I,1)
vb=c(I,2)
vat=0;

vat=vat+va-vb

end
vat
vd=vat+ci

set(handles.edit3,'string',vd);

20 de noviembre de 2014
VELAZQUE VELAZQUE, YIMI 2014

N, ci, c
KKKKK

I=1:N va=c(I,1)
vb=c(I,2)

Vat ,va , vb ,vd

20 de noviembre de 2014
vd
VELAZQUE VELAZQUE, YIMI 2014

2.-calcular las coordenadas de 4 puntos tomados desde una estación por método de radiación

Calculando analíticamente:

1.-hallamos la distancia estadimetrica en uno:

Se sabe por formula d = (m1-m)*200

Si ( )

Si ( )

Si ( )

20 de noviembre de 2014
Si ( )

2.-hallamos el ángulo α
si α

α
α
VELAZQUE VELAZQUE, YIMI 2014

α
2
3.-Hallamos el DH=d COS α
2
DH1 = d1 COS α1
2
DH1 = 33.80 cos ( )

DH1 = 33.769
2
DH2 = 25.20 cos ( )

DH2 =25.176
2
DH3 = 44.70cos ( )

DH3 =44.659
2
DH4 = 52.00cos ( )

DH4 = 51.949

( )
4.- hallamos su

( ( ))

( ( ))

20 de noviembre de 2014
( ( ))

( ( ))
VELAZQUE VELAZQUE, YIMI 2014

Diagrama de flujo

Num inst cot nort est

I=1:co , dh(I) ,dv (I) ,


norte(I), este(I)

dh, dv, di , norte , este ,cota

sdf

20 de noviembre de 2014
VELAZQUE VELAZQUE, YIMI 2014

1.- (CODIGO DE CALCULAR)

function varargout = coodenadas(varargin)


%
% See also: GUIDE, GUIDATA, GUIHANDLES

% Edit the above text to modify the response to help coodenadas

% Begin initialization code - DO NOT EDIT


gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @coodenadas_OpeningFcn, ...
'gui_OutputFcn', @coodenadas_OutputFcn, ...
'gui_LayoutFcn', [] , ...
'gui_Callback', []);
if nargin && ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end

if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT

% --- Executes just before coodenadas is made visible.


function coodenadas_OpeningFcn(hObject, eventdata, handles, varargin)

set(handles.text2,'visible','on');
set(handles.text3,'visible','on');
set(handles.text4,'visible','on');
set(handles.text5,'visible','on');
set(handles.text6,'visible','on');

20 de noviembre de 2014
set(handles.ins,'visible','on');
set(handles.cot,'visible','on');
set(handles.nor,'visible','on');
set(handles.est,'visible','on');

% hObject handle to figure


% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% varargin command line arguments to coodenadas (see VARARGIN)

% Choose default command line output for coodenadas


handles.output = hObject;

% Update handles structure


guidata(hObject, handles);
VELAZQUE VELAZQUE, YIMI 2014

% UIWAIT makes coodenadas wait for user response (see UIRESUME)


% uiwait(handles.figure1);

% --- Outputs from this function are returned to the command line.
function varargout = coodenadas_OutputFcn(hObject, eventdata, handles)
% varargout cell array for returning output args (see VARARGOUT);
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)

% Get default command line output from handles structure


varargout{1} = handles.output;

function num_Callback(hObject, eventdata, handles)


co=str2double(get(handles.num,'string'));
celda=cell(co,5);
celda(:,:)={''};
set(handles.tabla1,'Data',celda);
set(handles.tabla1,'ColumnEditable',true(1,5));
set(handles.tabla1,'visible','on');
set(handles.calcular,'visible','on');

function num_CreateFcn(hObject, eventdata, handles)


% hObject handle to num (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns
called

% Hint: edit controls usually have a white background on Windows.


% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'),

20 de noviembre de 2014
get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end

function ins_Callback(hObject, eventdata, handles)


% hObject handle to ins (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of ins as text


% str2double(get(hObject,'String')) returns contents of ins as a
double

% --- Executes during object creation, after setting all properties.


function ins_CreateFcn(hObject, eventdata, handles)
VELAZQUE VELAZQUE, YIMI 2014

% hObject handle to ins (see GCBO)


% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns
called

% Hint: edit controls usually have a white background on Windows.


% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end

function cot_Callback(hObject, eventdata, handles)


% hObject handle to cot (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of cot as text


% str2double(get(hObject,'String')) returns contents of cot as a
double

% --- Executes during object creation, after setting all properties.


function cot_CreateFcn(hObject, eventdata, handles)
% hObject handle to cot (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns
called

% Hint: edit controls usually have a white background on Windows.


% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end

20 de noviembre de 2014
function nor_Callback(hObject, eventdata, handles)
% hObject handle to nor (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of nor as text


% str2double(get(hObject,'String')) returns contents of nor as a
double

% --- Executes during object creation, after setting all properties.


function nor_CreateFcn(hObject, eventdata, handles)
% hObject handle to nor (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
VELAZQUE VELAZQUE, YIMI 2014

% handles empty - handles not created until after all CreateFcns


called

% Hint: edit controls usually have a white background on Windows.


% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end

function est_Callback(hObject, eventdata, handles)


% hObject handle to est (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of est as text


% str2double(get(hObject,'String')) returns contents of est as a
double

% --- Executes during object creation, after setting all properties.


function est_CreateFcn(hObject, eventdata, handles)
% hObject handle to est (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns
called

% Hint: edit controls usually have a white background on Windows.


% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end

20 de noviembre de 2014
% --- Executes on button press in calcular.
function calcular_Callback(hObject, eventdata, handles)

co=str2double(get(handles.num,'string'));
no=str2double(get(handles.nor,'string'));
es=str2double(get(handles.est,'string'));
in=str2double(get(handles.ins,'string'));
ct=str2double(get(handles.cot,'string'));
c=str2double(get(handles.tabla1,'data')); %datos de coordenadas

az=c(:,1)'; % azimut
av=c(:,2)'; % angulo vertical
m1=c(:,3)'; % hilo inferior
m=c(:,4)'; % hilo medio
m2=c(:,5)'; %hilo superior

for I=1:co
VELAZQUE VELAZQUE, YIMI 2014

di(I)=(m2(I)-m1(I))*100
dh(I)=(di(I))*((cosd((av(I))*(pi/180)))^2)
dv(I)=((di(I))/2)*(sin(2*(av(I))*(pi/180)))
norte(I)=no+dh(I)*(cos((az(I))*(pi/180)))
este(I)=es+dh(I)*(sin((az(I))*(pi/180)))
cota(I)=in+ct-m(I)+dh(I)

end
sdf=[dh;dv;di;norte;este;cota]

set(handles.tabla2,'data',sdf')
set(handles.tabla1,'visible','off');
set(handles.tabla2,'visible','on');
set(handles.atras1,'visible','on');
set(handles.calcular,'visible','off');

% --- Executes on button press in siguiente.


function siguiente_Callback(hObject, eventdata, handles)
%set(handles.text1,'string','Nuero de propiedades');

set(handles.text1,'visible','on');

set(handles.num,'visible','on');

set(handles.siguiente,'visible','off');

% --- Executes on button press in atras1.


function atras1_Callback(hObject, eventdata, handles)

set(handles.siguiente,'visible','off');
set(handles.atras1,'visible','off');

20 de noviembre de 2014
set(handles.calcular,'visible','on');

set(handles.tabla1,'visible','on');
set(handles.tabla2,'visible','off');

% --- Executes when entered data in editable cell(s) in tabla2.


function tabla2_CellEditCallback(hObject, eventdata, handles)
% hObject handle to tabla2 (see GCBO)
% eventdata structure with the following fields (see UITABLE)
% Indices: row and column indices of the cell(s) edited

Paso 1 ingresamos los datos del campo

Altura de instrumento (inst)= 1.50


VELAZQUE VELAZQUE, YIMI 2014

Cota=800

20 de noviembre de 2014
VELAZQUE VELAZQUE, YIMI 2014

DOCENTE: ING: LIZARBE ALARCON, Hemerson

20 de noviembre de 2014
ALUMNO: VELAZQUE VELAZQUE, YIMI
ESCUELA: INGENIERIA CIVIL
CURSO: PROGRAMACIÓN-(IC-246)
CODIGO: 16120643

You might also like