Professional Documents
Culture Documents
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT
handles.a=1 ;handles.a1=1;
handles.f1=4; handles.f2=4; handles.f3=4; handles.f4=4; handles.f5=4;
guidata(hObject, handles);
num_elem=cell(1,2);
num_elem(:,:)={''};
set(handles.uitable6,'Data',num_elem)
set(handles.uitable6,'ColumnEditable',true(1,2))
set(handles.uitable6,'visible','off')
set(handles.uitable10,'visible','off')
set(handles.pushbutton26,'visible','off')
jaja=cell(3,1);
jaja(:,:)={''}
set(handles.uitable8,'Data',jaja)
set(handles.uitable10,'Data',jaja)
% UIWAIT makes proyecto wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = proyecto_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)
a=get(handles.popupmenu1,'value');
a1=a
if a==3
a=2;
set(handles.uitable6,'visible','on');
set(handles.uitable10,'visible','on')
set(handles.uitable8,'visible','off')
else
a=1;
set(handles.uitable6,'visible','off');
set(handles.uitable10,'visible','off')
set(handles.uitable8,'visible','on')
end
handles.a=a;
handles.a1=a1;
guidata(hObject,handles);
L=str2double(get(handles.edit1,'string'))
Ap=(str2num(str2mat(get(handles.uitable6,'data'))))'
a=handles.a
a1=handles.a1
Pbruto=get(handles.uitable1,'data')
P=str2mat(Pbruto(:,1))
Px=str2mat(Pbruto(:,2))
P=(str2num(P))'
Px=(str2num(Px))'
if length(P)~=length(Px)
P=[]
Px=[]
end
Mbruto=get(handles.uitable2,'data')
M=str2mat(Mbruto(:,1))
Mx=str2mat(Mbruto(:,2))
M=(str2num(M))'
Mx=(str2num(Mx))'
if length(M)~=length(Mx)
M=[]
Mx=[]
end
Wbruto=get(handles.uitable3,'data')
W=str2mat(Wbruto(:,1))
Wx1=str2mat(Wbruto(:,2))
Wx2=str2mat(Wbruto(:,3))
W=(str2num(W))'
Wx1=str2num(Wx1)
Wx2=str2num(Wx2)
if length(W)~=length(Wx1) && length(W)~=length(Wx1)
W=[]
Wx=[]
end
Wx=[Wx1 Wx2]
FAbruto=get(handles.uitable4,'data')
FA=str2mat(FAbruto(:,1))
FAx=str2mat(FAbruto(:,2))
FA=(str2num(FA))'
FAx=(str2num(FAx))'
if length(FA)~=length(FAx)
FA=[]
FAx=[]
end
Wexbruto=get(handles.uitable5,'data')
Wexxy1=str2num(str2mat(Wexbruto(:,1)))
Wexxy2=str2num(str2mat(Wexbruto(:,2)))
%el Wex es especial
syms x
Wex=char(str2mat(Wexbruto(:,3)))
aux=cell(1,2)
aux(1,:)={'','0'}
aux=char(str2mat(aux))
j=1
[m,n]=size(Wex)
Wex1=Wex
if n~=0
for i=1:handles.f5
if Wex(i)==aux(1)
Wex1=[Wex1(1:j-1,:); Wex1(j+1:length(Wex1),:)]
else
j=j+1
end
end
Wex=(Wex1)'
else
Wex=[] %no estoy SEGUROOOOOOOOOOOOOOOOOOOO
end
Wexx1=str2num(str2mat(Wexbruto(:,4)))
Wexx2=str2num(str2mat(Wexbruto(:,5)))
if length(Wexxy1)~=length(Wexxy2) && length(Wexxy2)~=length(Wex) &&
length(Wex)~=length(Wexx1) length(Wexx1)~=length(Wexx2)
Wex=[]
Wexx=[]
Wexxy=[]
else
Wexx=[Wexx1 Wexx2]
Wexxy=[Wexxy1 Wexxy2]
end
Wx=[Wx1 Wx2]
%EL PROGRAMA
for i=1:length(Wex)
Wex(i)=subs(Wex(i),x-Wexxy(i,1))+Wexxy(i,2);
end
%fuerzas en x
c0=0
for i=1:length(FA)
c0=c0+FA(i)
end
%fuerzas en y
c1=0;
for i=1:length(P)
c1=c1+P(i)
end
for i=1:length(W)
c1=c1+abs(Wx(i,1)-Wx(i,2))*W(i);
end
for i=1:length(Wex)
c1=c1+int(Wex(i),Wexx(i,1),Wexx(i,2)); %intergracion numerica?
end
for i=1:m
M1(i,1)={char(ecfc(i,1))};
MM1(i)=ecfc(i,1);
M1(i,2)={char(ecfc(i,2))};
XX1(i)=(ecfc(i,2));
end
hold on
t=1;
for i=2:m
x=XX1(i);
f1=subs(MM1(t));
f1=double(f1);
x=double(x);
plot([x x],[0 f1],'--b','LineWidth',1)
plot([0 x],[f1 f1],'--b','LineWidth',1)
text(0,f1,int2str(f1),'Color','blue','FontSize',12)
text(x,0,int2str(x),'Color','blue','FontSize',12)
t=t+1;
end
hold off
%_____________________________
%grafica de fuerza cortante
t=1;
xlabel('Distancia (x)')
ylabel('Fuerza Cortante (V)')
for i=1:m
if (t<m)
x=XX1(t):0.01:XX1(t+1);
f1=subs(MM1(i));
title('Diagrama de Fuerza Cortante','FontSize',10,'Color',[1 0 0])
hold on
plot (x,f1,'r.','LineWidth',1)
else
end
t=t+1;
end
grid
hold off
%completar lineas de salto
t=1;
for i=2:m-1
XXX1(t)=XX1(i);
t=t+1;
end
hold on
for i=1:length(XXX1)
x=XXX1(i);
fx1=subs(MM1(i));
fx2=subs(MM1(i+1));
plot([x x],[fx1 fx2],'r','LineWidth',4)
end
hold off
%___________________________
[m,n]=size(ecmf);
M2=cell(m,2);
t=t+1;
end
hold off
hold on
t=1;
for i=2:m
x=XX2(i);
f2=subs(MM2(t));
f2=double(f2);
x=double(x);
plot([x x],[0 f2],'--b','LineWidth',1)
plot([0 x],[f2 f2],'--b','LineWidth',1)
text(0,f2,int2str(f2),'Color','blue','FontSize',12)
text(x,0,int2str(x),'Color','blue','FontSize',12)
t=t+1;
end
hold off
%_____________________________
%grafica de momento flector
t=1;
xlabel('Distancia (x)')
ylabel('Fuerza Cortante (V)')
for i=1:m
if (t<m)
x=XX2(t):0.01:XX2(t+1);
f2=subs(MM2(i));
hold on
plot (x,f2,'r.','LineWidth',1)
else
end
t=t+1;
end
grid
hold off
hold on
%________________________________
set(handles.uitable12,'Data',M1)
set(handles.uitable13,'Data',M2)
set(handles.pushbutton26,'visible','on')