How plot 2D and 3D of a function with contain wiener process?

15 Ansichten (letzte 30 Tage)
salim
salim am 12 Dez. 2024
Kommentiert: salim am 13 Dez. 2024
I have a function that includes a Wiener process, which I am encountering for the first time in a solution. I want to plot this function but am unsure how to proceed, as I have no experience plotting such functions
(sech(0.288e3 / 0.143e3 * t + x) ^ (0.1e1 / 0.4e1)) * exp(i * (-0.3e1 * x - 0.3e1 * t + (2 * W(t))))

Akzeptierte Antwort

Sameer
Sameer am 13 Dez. 2024
The Wiener process can be simulated using random walks.
Here's an example of how you can plot your function:
% Parameters
t_max = 20; % Maximum time
x_max = 20; % Maximum space
dt = 0.01; % Time step
dx = 0.1; % Space step
% Time and space vectors
t = 0:dt:t_max;
x = -x_max:dx:x_max;
% Initialize Wiener process
W = zeros(size(t));
for i = 2:length(t)
W(i) = W(i-1) + sqrt(dt) * randn; % Random walk
end
% Preallocate solution matrix
U = zeros(length(x), length(t));
% Calculate the function
for i = 1:length(x)
for j = 1:length(t)
U(i, j) = (sech(0.288e3 / 0.143e3 * t(j) + x(i)) ^ (0.1e1 / 0.4e1)) * ...
exp(1i * (-0.3e1 * x(i) - 0.3e1 * t(j) + (2 * W(j))));
end
end
% Plot the real part of the solution
figure;
surf(t, x, real(U));
shading interp;
xlabel('Time (t)');
ylabel('Transformed Space (\xi)');
zlabel('Amplitude (u)');
title('Stochastic Kudryashov Soliton Solution with Multiplicative Noise (Wiener Process)');
colorbar;
Hope this helps!
  1 Kommentar
salim
salim am 13 Dez. 2024
thank you for your help but i have some issue with graph the quality og graph is not suatable for publishing in journals How i can get a beter view of my graph like in below picture

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Mathematics finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by