How can Plot in Matlab by exported data in maple?
이 질문을 팔로우합니다.
- 팔로우하는 게시물 피드에서 업데이트를 확인할 수 있습니다.
- 정보 수신 기본 설정에 따라 이메일을 받을 수 있습니다.
오류 발생
페이지가 변경되었기 때문에 동작을 완료할 수 없습니다. 업데이트된 상태를 보려면 페이지를 다시 불러오십시오.
이전 댓글 표시
0 개 추천
i have a matrix data from maple but How i can get 2D-3D-plots this of this data?
채택된 답변
Walter Roberson
2024년 12월 17일
data = load('ST1.txt');
core = reshape(data(:, 3),100,100).';
subplot(3,1,1)
surf(real(core),'edgecolor', 'none')
subplot(3,1,2)
surf(imag(core),'edgecolor', 'none')
subplot(3,1,3)
surf(abs(core),'edgecolor', 'none')
댓글 수: 5
@Walter Roberson this is exactly i am want and is so good and this is show that are you expert becuase i didn't explain this about real&imag and abs(@) but you did all of them in one figure i want them seperatly becuase the function is not clear like that also i want two dimension if possible be like that 

but your graph is like that

is not clear so much but in top graph is so clear with inset graph of 2-D with effect of noise it will be something emazing and different can you do that also i export data in maple matrix this time just for one plot if make a different please help for finishing the work if possible
or something like that for this data

data = load('ST1.txt');
core = reshape(data(:, 3),100,100).';
figure()
surf(real(core),'edgecolor', 'none')
xlabel('x'); ylabel('y'); zlabel('ST1'); title('real ST1');
figure()
surf(imag(core),'edgecolor', 'none')
xlabel('x'); ylabel('y'); zlabel('ST1'); title('imag ST1');
figure()
surf(abs(core),'edgecolor', 'none')
xlabel('x'); ylabel('y'); zlabel('ST1'); title('abs ST1');
@Walter Roberson I’ve been working on a MATLAB project for over a month, but I’m stuck on a problem with plotting. Despite seeking help from various experts, I haven’t found a solution. The current graph doesn’t convey sufficient detail or meet the standards for publication in a high-impact journal.
A friend helped me by writing some code, but I need further improvements and fixes to achieve a professional and detailed result. Since you seem skilled in MATLAB, I hope you can assist me in refining the plot to make it publication-ready.
% 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));
noise=zeros(size(u_stochastic));
% Time evolution
for n = 1:length(t)
% Apply the Wiener noise factor at time step n
noise_factor = 1 + W(n);
noise(n,:)=noise_factor;
% 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_deterministic, 'EdgeColor', 'none');
title('Deterministic (Wiener Process)');
xlabel('Transformed Space (\xi)');
ylabel('Time (t)');
zlabel('Amplitude (u)');
colormap jet;
figure
surfc(xi, t, noise, 'EdgeColor', 'none');
title('Multiplicative Noise (Wiener Process)');
xlabel('Transformed Space (\xi)');
ylabel('Time (t)');
zlabel('Amplitude (u)');
colormap jet;
figure
surfc(xi, t, u_stochastic, 'EdgeColor', 'none');
title('Stochastic (Wiener Process)');
xlabel('Transformed Space (\xi)');
ylabel('Time (t)');
zlabel('Amplitude (u)');
colormap jet;
figure
surfc(xi, t, u_stochastic, 'EdgeColor', 'none');
title('Stochastic (Wiener Process)');
xlabel('Transformed Space (\xi)');
ylabel('Time (t)');
zlabel('Amplitude (u)');
colormap jet;
xlim([0 20])
ylim([-5 1])
zlim([-1 2])
i solved this problem which contain stochastic but i don't have expreince in stochastic this is my first time i faced to such problem

Below is my solution. As you can see, the Wiener process appears in the PDE soliton solution. I’ve treated all variables as constants except for delta and w(t), where w(t) represents a random Wiener process. The key parameter is delta. When δ=0, there is no noise in the system, but as delta increases, the noise becomes more pronounced. My goal is to demonstrate how changes in delta affect the behavior of the function.

alos countour of graph must be like this which show all part of noise

Additionally, this is another paper that demonstrates the effect of delta and includes a 3D graph showing the same behavior that you referenced. That’s the entire concept I wanted to convey.

In the top picture, ϵ corresponds to δ in our function. As ϵ (or delta) increases, the noise also increases. I want to highlight this effect. If you have any questions, I’ll be here to answer them. Thank you for your valuable work!
Sorry, I do not know anything about publication-ready plots.
salim
2024년 12월 20일
@Walter Roberson Thanks.
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Orange에 대해 자세히 알아보기
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
