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

44 visualizzazioni (ultimi 30 giorni)
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');

Risposta accettata

Star Strider
Star Strider il 25 Dic 2024 alle 17:30
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 Commenti
salim saeed
salim saeed il 27 Dic 2024 alle 12:59
@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 il 27 Dic 2024 alle 13:44
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.
.

Accedi per commentare.

Più risposte (0)

Prodotti


Release

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by