How change design of my graph to this shape by data analysis?

조회 수: 1 (최근 30일)
salim
salim 2024년 12월 25일
댓글: Star Strider 2024년 12월 27일
i want my graph be like that like dimension and color ?
and i can plot the same plot for 2D like second graph too?
data = load('ST3.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');

채택된 답변

Star Strider
Star Strider 2024년 12월 25일
I am not certain what you are asking.
Choosing a matching colormap is straightforward, and turbo seems to be close to that in your posted image.
With respect to thd 2D plots, the patch documentation offers an approach that I copied and adapted here.
You can see the surface from the top by using the view function.
Examples —
data = load('ST3.txt');
core = reshape(data(:, 3),100,100).';
figure()
surf(real(core),'edgecolor', 'none')
xlabel('x'); ylabel('y'); zlabel('ST1'); title('real ST1');
colormap(turbo)
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');
colormap(turbo)
figure()
surf(abs(core),'edgecolor', 'none')
xlabel('x'); ylabel('y'); zlabel('ST1'); title('abs ST1 (Top View)');
colormap(turbo)
view(0,90)
xv = linspace(0, 1, size(core,1));
Choose_Row = 50;
yv = core(Choose_Row,:); % Choose The Rows Or Column You Want To Plot
yv(end) = NaN;
figure
patch(xv, yv, yv, EdgeColor='interp', LineWidth=2)
grid
colormap(turbo)
xlabel('x')
ylabel('y')
title("Row "+Choose_Row)
.
  댓글 수: 9
salim
salim 2024년 12월 27일
@Star Strider undrestanding is not easy but i am beliave that if you undrestand you can plot this is best shap i will upload code of maple here also if you watch my function contain W(t) function which is wainer process (brawnian motion) in stochastic is random variable which for make a function have a niose , in a lot of paper of solving NPDE have this W(t) so i have to plot the function which contain random variable if you watch STX matrix in picture you will see TX_Wfree *~ T_W which is combine function with W(t) function and make effect is shown up
code of maple:
restart;
currentdir(kernelopts(':-homedir')):
randomize():
local gamma:
T3 := (B[1]*(tanh(2*n^2*(delta^2 - psi)*k*t/((k*n - 1)*(k*n + 1)) + x) - 1))^(1/(2*n))*exp((-k*x + psi*t + delta*W(t) - delta^2*t)*I);
/ 1 \
|---|
\2 n/
/ / / 2 / 2 \ \ \\
| | |2 n \delta - psi/ k t | || / /
T3 := |B[1] |tanh|----------------------- + x| - 1|| exp\I \
\ \ \ (k n - 1) (k n + 1) / //
2 \\
-k x + psi t + delta W(t) - delta t//
params := {B[1]=1, n=2, delta=0.5, psi=1, k=3 }:
insert numerical values
solnum :=subs(params, T3):
N := 100:
use Finance in:
Wiener := WienerProcess():
P := PathPlot(Wiener(t), t = 0..10, timesteps = N, replications = 1):
end use:
W__points := plottools:-getdata(P)[1, -1];
t_grid := convert(W__points[..,1], list):
x_grid := [seq(-2..2, 4/N)]:
T3_Wfree := eval(T3, {W(t)=0, op(params)});
TX_Wfree := Matrix((N+1)$2, (it, ix) -> evalf(eval(T3_Wfree, {t=t_grid[it], x=x_grid[ix]}))):
T_W := Matrix((N+1)$2, (it, ix) -> W__points[it, 2]):
STX := TX_Wfree *~ T_W;
plots:-matrixplot(Re~(STX));plots:-matrixplot(abs~(STX));plots:-matrixplot(Im~(STX))
MatlabFile := "ST3.txt";
ExportMatrix(MatlabFile, STX, target = MATLAB, format = rectangular, mode = ascii, format = entries);
427884
currentdir();
Star Strider
Star Strider 2024년 12월 27일
I am sorry, however I still do not understand what you want to do. I now get the impression that this involves some sort of partial differential equation, however the relation of that and the posted files is still completely unclear.
So far, none of this makes any sense to me. I do not understand how the posted files figure into what you want to do.
You will need to explain what you want to do clearly, completely, and concisely, as well as how the posted files figure into it. I understand that putting complicated mathematical concepts into words can be difficult, however you need to take the time to do that.
.

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

추가 답변 (0개)

카테고리

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

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by