Clear Filters
Clear Filters

Info

This question is closed. Reopen it to edit or answer.

plot graph Code problem

2 views (last 30 days)
영석
영석 on 8 Nov 2023
Closed: Dyuman Joshi on 8 Nov 2023
% MakeMohrStressCircle_ex1.m
% This matlab code for Mohr's Circle
%==Given 2D stress components Given at a point =
Sig_x = 3
Sig_y = 0
Tau_xy = 2
% R:Radius of a Circle ==================
R = sqrt((Sig_x- Sig_y)^2/4+Tau_xy^2);
% Center of the Mohr's Stress Circle ====
Sig_xc =(Sig_x+ Sig_y)/2
Sig_yc = 0
Theta = atand(Tau_xy/(Sig_x-Sig_xc))/2
% Principal stresses ====================
Sig_1 = Sig_xc + R
Sig_2 = Sig_xc - R
% Max shear stress ======================
Tau_max = R
%===== Making Mohr's Circle =============
x=-pi:pi/180:pi;
x1 = R*cos(x)+Sig_xc;
y1 = R*sin(x)+Sig_yc;
plot(x1,y1)
title('Make a Mohr stress Circle with R')
xlabel('Normal stresses \sigma')
ylabel('Shear stress \tau')
grid on
axis ([Sig_xc-R, Sig_xc+R, -2-R, 2+R])
axis equal, hold on
% =========================================
plot([0 0], [-2-R, 2+R]) % y-축
plot([Sig_xc-2*R Sig_xc+2*R], [0 0]) % x-축
%==========================================
I want to make it like the second picture, so please solve the code problem
plz
  1 Comment
VBBV
VBBV on 8 Nov 2023
Edited: VBBV on 8 Nov 2023
you can use text function and annotations to include comments, symbols to the graphs. Use the position property to place the text/symbol details where you want to add them.

Answers (0)

This question is closed.

Tags

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!