How to make a line in Mohrcircle
2 次查看(过去 30 天)
显示 更早的评论
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 个)
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')
0 个评论
RAJA KUMAR
2023-12-20
- Use the equation of straight line (x-x0)/(x1-x0) = (y-y0)/(y1-y0).
- Now Decide a variable to store the data for this straight line.
- Make sure the data you store for x,y are within the limits for the plot you want to show
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!