how can I join points along a two plots with straight lines?
2 views (last 30 days)
Brendan Atarigiya on 8 Jul 2016
hello. I have written this code to draw a slope model for me. First, there is the linear slip surface and then the circular slip surface. both functions have thesame vectorizations. Now I want to connect the points of both plots with straight lines. Can anyone help me out??? thank you"
H = 5;
Yc = 11;
R = 20;
fr = 45; % slope angle in degrees
tfr = tand(fr); % slope angle in gradient
%%Slip surface generation
xmin = Xc - sqrt(abs(R^2 - Yc^2)); % Exit point of slip circle
xmax = Xc + sqrt(abs(R^2 - (Yc-H)^2)); % Entry point of slip circle
x = linspace(xmin,xmax,ns)'; % Positions where the forces will be analyzed.
ybot = Yc - sqrt(abs(R^2-(x-Xc).^2)); % Equation for generating slip circle
%%Slope surface generation
ytop = (x>=0).*(x<(H/tfr)).*(x*tfr) + (x>=(H/tfr)).*H; % Slope surface. equation of a line is used