How to make a line in Mohrcircle

조회 수: 2 (최근 30일)
jeongyeon kim
jeongyeon kim 2023년 12월 20일
편집: lazymatlab 2023년 12월 20일
I make a Mohrcirlce matlab program and I want to draw line like this. Then how to change the matlab?
% MohrCircle_Area_ex1.m
% This matlab code for Mohr's Aera Circle about cross section
% of the beam.
clear clc clf
format compact
I_x = 3
I_y = 0
I_xy = 2
% R:Radius of a Circle ==================
R = sqrt((I_x- I_y)^2/4+I_xy^2);
% Center of the Mohr's Area Circle ====
I_xc =(I_x+ I_y)/2
I_yc = 0
Theta = atand(I_xy/(I_x-I_xc))/2
% Principal stresses ====================
I_1 = I_xc + R
I_2 = I_xc - R
% Max Value of I_xy : I_max =============
I_max = R
%===== Making Mohr's Circle =============
x=-pi:pi/180:pi;
x1 = R*cos(x)+I_xc;
y1 = R*sin(x)+I_yc;
plot(x1,y1)
title('Make a Mohr Area Circle with R')
xlabel('Normal I')
ylabel('Ixy')
grid on
axis ([I_xc-R, I_xc+R, -2-R, 2+R])
axis equal, hold on
% =========================================
plot([0 0], [-2-R, 2+R]) % y-축
plot([I_xc-2*R I_xc+2*R], [0 0]) % x-축
%==========================================
  댓글 수: 2
KSSV
KSSV 2023년 12월 20일
Pick the points and use plot or line.
jeongyeon kim
jeongyeon kim 2023년 12월 20일
Can you make that commender?

댓글을 달려면 로그인하십시오.

답변 (2개)

lazymatlab
lazymatlab 2023년 12월 20일
편집: lazymatlab 2023년 12월 20일
Because the center is fixed and the lines would pass the center (because it's Mohr's circle), all you need is either x value of two intersections of line and circle. Then the coordinate of other side of the line is determined.
Add this below your code. Adjust x1 values as you want.
x1 = 1.799;
y1 = sqrt(R^2 - (x1 - I_xc)^2);
x2 = I_xc - (x1 - I_xc);
y2 = -y1;
plot([x1, x2], [y1, y2], 'm')

RAJA KUMAR
RAJA KUMAR 2023년 12월 20일
  1. Use the equation of straight line (x-x0)/(x1-x0) = (y-y0)/(y1-y0).
  2. Now Decide a variable to store the data for this straight line.
  3. Make sure the data you store for x,y are within the limits for the plot you want to show

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by