salim-barzani

1555 Reputation

9 Badges

1 years, 15 days

MaplePrimes Activity


These are questions asked by salim-barzani

i already use this method for a lot of equation but this time something not normal hapening what is problem?

``

restart

with(PDEtools)

with(LinearAlgebra)

with(Physics)

with(SolveTools)

``

eq0 := -4*alpha*k^2*m^2*n^2*A[0]^2+4*beta*k*m*n^2*A[0]^3-4*gamma*k*m*n^2*A[0]^3+4*delta^2*m*n^2*A[0]^2-4*n^2*sigma*A[0]^4-4*m*n^2*w*A[0]^2 = 0

eq1 := -8*alpha*k^2*m^2*n^2*A[0]*A[1]+12*beta*k*m*n^2*A[0]^2*A[1]-12*gamma*k*m*n^2*A[0]^2*A[1]+8*delta^2*m*n^2*A[0]*A[1]-16*n^2*sigma*A[0]^3*A[1]+2*a*alpha*m*n*A[0]*A[1]-8*m*n^2*w*A[0]*A[1] = 0

eq2 := -4*alpha*k^2*m^2*n^2*A[1]^2+12*beta*k*m*n^2*A[0]*A[1]^2-12*gamma*k*m*n^2*A[0]*A[1]^2+4*delta^2*m*n^2*A[1]^2-24*n^2*sigma*A[0]^2*A[1]^2+a*alpha*m^2*A[1]^2+3*alpha*b*m*n*A[0]*A[1]-4*m*n^2*w*A[1]^2 = 0

eq3 := 4*beta*k*m*n^2*A[1]^3-4*gamma*k*m*n^2*A[1]^3-16*n^2*sigma*A[0]*A[1]^3+alpha*b*m^2*A[1]^2+alpha*b*m*n*A[1]^2+4*alpha*c*m*n*A[0]*A[1] = 0

eq4 := -4*n^2*sigma*A[1]^4+alpha*c*m^2*A[1]^2+2*alpha*c*m*n*A[1]^2 = 0

C := solve({eq0, eq1, eq2, eq3, eq4}, {a, b, c, `__ `*A[0]})

Warning, solving for expressions other than names or functions is not recommended.

 

(1)
 

NULL

Download problem.mw

This is my first time working with plotting data from a matrix. However, with the help of a friends on MaplePrimes, I learned how to plot the data in both Maple and MATLAB. Despite this, I am having trouble with visualization. When I change the delta value, my function experiences vibrations or noise, which is clearly visible in the plot. But when I change delta, I encounter errors with my matrix data. How can I fix this problem? and there is any way for get better visualization by Explore ? also How show this vibration or noise in 2D?

restart;

randomize():

local gamma;

gamma

(1)

currentdir(kernelopts(':-homedir'))

NULL

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)

NULL

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

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

(3)

NULL

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[36893490640185799852]

(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)

421796

(7)

NULL

Download data-analysis.mw

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

What systematic methods can be used to determine the optimal parameters in a long equation involving two independent variables, and how do techniques like separation of variables, balancing principles, or dimensional analysis aid in simplifying and solving such equations?

parameters_x_t.mw

First 18 19 20 21 22 23 24 Last Page 20 of 32