Question: Transform data in maple to Matlab or make analysis by Excel worksheet for making Plot?

I have a matrix for data analysis that I want to plot. Ideally, I would like to use Maple, but I’m struggling to create a well-designed plot suitable for submission to journals. Because of this, I’m considering transferring the data to Excel or constructing a 3D graph using MATLAB.

My question is: how can I transfer this data to Excel? The data is currently saved as a Notepad file, but I’m unsure how to convert it into an Excel format. I will upload a figure to show the data structure.

also in last runig program give me error which is (Error, (in ExportMatrix) permission denied

Thank you in advance for any help!

restart;

randomize():

local gamma;

gamma

(1)
 

T3 := (B[1]*(tanh(2*n^2*(delta^2-w)*k*t/((k*n-1)*(k*n+1))+x)-1))^(1/(2*n))*exp(I*(-k*x+w*t+delta*W(t)-delta^2*t))

(B[1]*(tanh(2*n^2*(delta^2-w)*k*t/((k*n-1)*(k*n+1))+x)-1))^((1/2)/n)*exp(I*(-k*x+w*t+delta*W(t)-delta^2*t))

(2)

``

params := {B[1]=1,n=2,delta=1,w=1,k=3 };

{delta = 1, k = 3, n = 2, w = 1, B[1] = 1}

(3)

``

insert numerical values

solnum :=subs(params, T3);

(tanh(x)-1)^(1/4)*exp(I*(-3*x+W(t)))

(4)

CodeGeneration['Matlab']('(tanh(x)-1)^(1/4)*exp(I*(-3*x+W(t)))')

Warning, the function names {W} are not recognized in the target language

 

cg = ((tanh(x) - 0.1e1) ^ (0.1e1 / 0.4e1)) * exp(i * (-0.3e1 * x + W(t)));

 

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)]:

T, X := map(mul, [selectremove(has, [op(expand(solnum))], t)])[]:

ST := unapply(eval(T, W(t)=w), w)~(W__points[.., 2]):
SX := evalf(unapply(X, x)~(x_grid)):

STX := Matrix(N$2, (it, ix) -> ST[it]*SX[ix]);

_rtable[36893489786521178348]

(5)

opts := axis[1]=[tickmarks=[seq(k=nprintf("%1.1f", t_grid[k]), k=1..N, 40)]],
        axis[2]=[tickmarks=[seq(k=nprintf("%1.1f", x_grid[k]), k=1..N, 40)]],
        style=surface:

DocumentTools:-Tabulate(
  [
    plots:-matrixplot(Re~(STX), opts),
    plots:-matrixplot(Im~(STX), opts),
plots:-matrixplot(abs~(STX), opts)
  ]
  , width=60
)

"Tabulate"

(6)

MatlabFile := cat(currentdir(), "/ST2.txt"); ExportMatrix(MatlabFile, STX, target = MATLAB, format = rectangular, mode = ascii, format = entries)

Error, (in ExportMatrix) permission denied

 
 

 

Download data-analysis.mw

Please Wait...