Circulo de mohr codigo
Circulo de mohr codigo
% singleton*.
% existing singleton*. Starting from the left, property value pairs are
% *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one
gui_Singleton = 1;
'gui_LayoutFcn', [] , ...
'gui_Callback', []);
gui_State.gui_Callback = str2func(varargin{1});
end
if nargout
else
gui_mainfcn(gui_State, varargin{:});
end
handles.output = hObject;
guidata(hObject, handles);
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
varargout{1} = handles.output;
function esfuerzox_Callback(hObject, eventdata, handles)
% handles empty - handles not created until after all CreateFcns called
set(hObject,'BackgroundColor','white');
end
% handles empty - handles not created until after all CreateFcns called
set(hObject,'BackgroundColor','white');
end
% handles empty - handles not created until after all CreateFcns called
set(hObject,'BackgroundColor','white');
end
% handles empty - handles not created until after all CreateFcns called
set(hObject,'BackgroundColor','white');
end
esx = str2num(get(handles.esfuerzox,'string'));
esy = str2num(get(handles.esfuerzoy,'string'));
txy = str2num(get(handles.taoxy,'string'));
txyp = txy
txyn = -txy
angulo = str2num(get(handles.angulo,'string'));
r = (sqrt(((esy-esx)^2)+((txyn-txyp)^2)))/2;
tmax = r
ca = sqrt(r^2 - txy^2)
dorce = ca + esx
esfuerzo1 = r + dorce;
esfuerzo2 = dorce - r;
dtta = rad2deg(atan((txy)/(ca)))
anguloori = dtta/2
x = 2 * angulo;
esfuerzos = (cosd(x));
taoform = (sind(x));
txypriman = -txyprima
%circunferencia
xc = dorce
yc = 0
x=r*cos(theta)+xc
y=r*sin(theta)+yc
plot(x,y);
a = [-200 200]
b = a-a
hold on
plot(a,b,'k-');
plot(b,a,'k-');
puntoA = [esy,esx]
puntoB = [txyp,txyn]
plot(esy,txyp, 'ko');
plot(esx,txyn, 'ko');
plot(dorce, 0, 'ko');
plot(esfuerzo1, 0, 'mo')
plot(esfuerzo2, 0, 'mo')
puntoAp = [sigpri1,sigpri2]
puntoBp = [txypriman,txyprimap]
plot(sigpri2,txyprimap, 'ko');
plot(sigpri1,txypriman, 'ko');
hold off
grid on;
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
set(hObject,'BackgroundColor','white');
end