Effacer les filtres
Effacer les filtres

How to make a line in Mohrcircle

1 vue (au cours des 30 derniers jours)
jeongyeon kim
jeongyeon kim le 20 Déc 2023
Modifié(e) : lazymatlab le 20 Déc 2023
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 commentaires
KSSV
KSSV le 20 Déc 2023
Pick the points and use plot or line.
jeongyeon kim
jeongyeon kim le 20 Déc 2023
Can you make that commender?

Connectez-vous pour commenter.

Réponses (2)

lazymatlab
lazymatlab le 20 Déc 2023
Modifié(e) : lazymatlab le 20 Déc 2023
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 le 20 Déc 2023
  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

Catégories

En savoir plus sur Creating and Concatenating Matrices dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by