How to make a line in Mohrcircle
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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-축
%==========================================
Réponses (2)
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')
0 commentaires
RAJA KUMAR
le 20 Déc 2023
- 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 commentaires
Voir également
Catégories
En savoir plus sur 2-D and 3-D Plots 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!