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

조회 수: 3 (최근 30일)
salim
salim 2024년 12월 12일
댓글: salim 2024년 12월 13일
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))))

채택된 답변

Sameer
Sameer 2024년 12월 13일
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
salim
salim 2024년 12월 13일
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

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Exploration and Visualization에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by