How can I make maximum points of curves in 2nd region curves not as triangles?

Answers (1)

Use
% Plotting each curve with a distinct color and label
plot(r_vec(1:100),real(u_vals(1:100)), '-', 'Color', colors(m,:), ...
'LineWidth', 2,'DisplayName',sprintf('\\rho_1 = %g', params.rho1))
plot(r_vec(102:end),real(u_vals(102:end)), '-', 'Color', colors(m,:), ...
'LineWidth', 2,'HandleVisibility', 'off');
instead of
% Plotting each curve with a distinct color and label
plot(r_vec, real(u_vals), '-', 'Color', colors(m,:), ...
'LineWidth', 2, 'DisplayName', sprintf('\\rho_1 = %g', params.rho1));

6 Comments

No, there is a jump of your curves in r=1.
I thought it was your intention not to plot the vertical lines at r = 1 indicating the jump in values.
How can I increase step points to be curved?
I used this:
u_smooth = smoothdata(real(u_vals), 'gaussian', 9);
But still broken curves
So you think that
lim (r->1-) u1(r) = lim (r->1+) u2(r)
?
Yes, I resolved the problem.
I don't see it:
% SH2 - Velocity Profile Evolution Solver
% Simulates and plots the velocity profile for 4 different values of rho1.
sigma = 1;
rho1_vals = [0.01, 1, 5, 10]; % Represents the 4 distinct curves
params = struct('s1', 0.3, 'c', 10, 's2', 0.1, 'alpha', 1, ...
'j', 0.1, 'mu1', 0.1, 'mu2', 1, 'g', 1);
% Loop through the 4 curves corresponding to each rho1 value
for m = 1:length(rho1_vals)
params.rho1 = rho1_vals(m);
eps = 1e-10;
r = 1-eps;
u_left = get_one_point(sigma, params, r)
r = 1+eps;
u_right = get_one_point(sigma, params, r)
end
u_left = 0.0059
u_right = -0.0996
u_left = 0.0058
u_right = -0.0972
u_left = 0.0053
u_right = -0.0886
u_left = 0.0048
u_right = -0.0798

Sign in to comment.

Tags

Asked:

on 21 Jul 2026

Edited:

on 21 Jul 2026

Community Treasure Hunt

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

Start Hunting!