Why doesn’t my figure look correct? Is there something wrong with it?

조회 수: 5 (최근 30일)
salim
salim 2024년 12월 16일
댓글: salim 2024년 12월 17일
In stochastic processes, the Brownian motion should appear throughout the entire function, but in my figure, it only appears at the top. What could be causing this mistake? I consulted an expert in stochastic processes, and they confirmed that this is an error. How can I fix it? i am looking for a plot like that
% Parameters
n = 1;
A = 1; % Amplitude
B = 1; % Width parameter of soliton
v = 1; % Velocity of soliton
alpha = 1; % Nonlinearity parameter
beta = 0.1; % Dispersion parameter
gamma = 0.05; % Noise intensity for multiplicative noise
% Grid for xi and time
xi = linspace(-20, 20, 2000); % Spatial range in transformed coordinates
t = linspace(-20, 20, 2000); % Time range
dt = t(2) - t(1); % Time step
% Generate Wiener process (increments) for time
W = cumsum(sqrt(dt) * randn(size(t))); % Wiener process for each time step
W = gamma * W; % Scale Wiener process by gamma
% Define initial soliton profile (deterministic solution)
u_deterministic = abs(((tanh(0.192e3 ./ 0.35e2 .* t' + xi) - 0.1e1) .^ (0.1e1 ./ 0.4e1)) .* exp(i * (-0.3e1 .* xi - 0.8e1 * t' + (3 .* W' ))));
% Ensure u_deterministic has the correct dimensions (time x space)
if size(u_deterministic, 1) ~= length(t) || size(u_deterministic, 2) ~= length(xi)
error('Mismatch in dimensions of u_deterministic. Check calculations.');
end
% Initialize storage for the stochastic solution
u_stochastic = zeros(length(t), length(xi));
% Time evolution
for n = 1:length(t)
% Apply the Wiener noise factor at time step n
noise_factor = 1 + W(n);
% Update solution with multiplicative noise
u_stochastic(n, :) = u_deterministic(n, :) * noise_factor;
end
% Plot the 3D surface of the stochastic Kudryashov soliton
figure;
surfc(xi, t, u_stochastic, 'EdgeColor', 'none');
xlabel('Transformed Space (\xi)');
ylabel('Time (t)');
zlabel('Amplitude (u)');
title('Stochastic Kudryashov Soliton Solution with Multiplicative Noise (Wiener Process)');
colormap jet;
color
  댓글 수: 4
Mathieu NOE
Mathieu NOE 2024년 12월 17일
hello again @salim saeed
no , un fortunately this is not a topic I a working on... sorry . As I said I had some luck finding the paper from which you extracted the figure , but I just see that between the two plots there are differences (the publication mention S1 plot and S4 plot , so I wonder if you are comparing the same type of plots).
also I didn't recognize the equations you used in the code vs the one in the publication but maybe you have cretaed your plots from another reference - it could be beneficial to share as well the references you used.
salim
salim 2024년 12월 17일
@Mathieu NOE This is my own solution, and I need assistance with the plotting part. If you know of any plotting techniques or tools or something similar, please share them with me.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Waveform Generation에 대해 자세히 알아보기

제품


릴리스

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by