mehdibgh

240 Reputation

6 Badges

7 years, 249 days

MaplePrimes Activity


These are questions asked by mehdibgh

In matlab there is a sqrtm() command to calculate the square root of square matrices, I want to know if there is a similar command in Maple to do same thing?

Hi,

In part of my program I defined variable Delta bar(`#mover(mi("Δ"),mo("-"))`), and used it and other parameters in a matrix named K (K=f(Delta_bar, x,y,...) then by using some mathematical operations, I initialled parameters to get my matrix named K.

Now I want to convert datatype of my matrix K with following command

M := Matrix(`~`[convert](K, float[8]), datatype = float[8]):

but receive following error:

Error, (in `convert/float`[8]) cannot handle unevaluated name ``#mover(mi("Δ"),mo("&uminus0;"))`` in evalhf


Do anyone know where the problem is?

 

I did change of variables as below:

 


 

``

restart

Error, invalid input: with expects its 1st argument, pname, to be of type {`module`, package}, but received shareman

 

``

UP := Int(1/2*(K__ux0*u0(x, y, t)^2+K__vx0*v0(x, y, t)^2+K__wx0*w0(x, y, t)^2+`K__φx0`*phi(x, y, t)^2+`K__ψx0`*psi(x, y, t)^2), y = 0 .. b)+Int(1/2*(K__uxa*u0(x, y, t)^2+K__vxa*v0(x, y, t)^2+K__wxa*w0(x, y, t)^2+`K__φxa`*phi(x, y, t)^2+`K__ψxa`*psi(x, y, t)^2), y = 0 .. b)+Int(1/2*(K__uy0*u0(x, y, t)^2+K__vyb*v0(x, y, t)^2+K__wyb*w0(x, y, t)^2+`K__φyb`*phi(x, y, t)^2+`K__ψy0`*psi(x, y, t)^2), x = 0 .. a)+Int(1/2*(K__uyb*u0(x, y, t)^2+K__vyb*v0(x, y, t)^2+K__wyb*w0(x, y, t)^2+`K__φyb`*phi(x, y, t)^2+`K__ψyb`*psi(x, y, t)^2), x = 0 .. a):

varchange := {t = a*tau*sqrt(rho/A__ref), x = (1/2)*a*(Zeta+1), y = (1/2)*b*(eta+1), phi(x, y, t) = h*`#mover(mi("φ",fontstyle = "normal"),mo("&uminus0;"))`(Zeta, eta, tau), psi(x, y, t) = h*`#mover(mi("ψ",fontstyle = "normal"),mo("&uminus0;"))`(Zeta, eta, tau), u0(x, y, t) = h*`#mover(mi("u"),mo("&uminus0;"))`(Zeta, eta, tau), v0(x, y, t) = h*`#mover(mi("v"),mo("&uminus0;"))`(Zeta, eta, tau), w0(x, y, t) = h*`#mover(mi("w"),mo("&uminus0;"))`(Zeta, eta, tau)}:

``

Ut := PDEtools:-dchange(varchange, UP, [`#mover(mi("u"),mo("&uminus0;"))`, `#mover(mi("v"),mo("&uminus0;"))`, `#mover(mi("w"),mo("&uminus0;"))`, `#mover(mi("φ",fontstyle = "normal"),mo("&uminus0;"))`, `#mover(mi("ψ",fontstyle = "normal"),mo("&uminus0;"))`, Zeta, eta, tau], params = [a, b, rho, A__ref]):

Ut

Int((1/2)*((1/2)*K__ux0*h^2*`#mover(mi("u"),mo("&uminus0;"))`(Zeta, eta, tau)^2+(1/2)*K__vx0*h^2*`#mover(mi("v"),mo("&uminus0;"))`(Zeta, eta, tau)^2+(1/2)*K__wx0*h^2*`#mover(mi("w"),mo("&uminus0;"))`(Zeta, eta, tau)^2+(1/2)*`K__φx0`*h^2*`#mover(mi("φ",fontstyle = "normal"),mo("&uminus0;"))`(Zeta, eta, tau)^2+(1/2)*`K__ψx0`*h^2*`#mover(mi("ψ",fontstyle = "normal"),mo("&uminus0;"))`(Zeta, eta, tau)^2)*b, eta = -1 .. 1)+Int((1/2)*((1/2)*K__uxa*h^2*`#mover(mi("u"),mo("&uminus0;"))`(Zeta, eta, tau)^2+(1/2)*K__vxa*h^2*`#mover(mi("v"),mo("&uminus0;"))`(Zeta, eta, tau)^2+(1/2)*K__wxa*h^2*`#mover(mi("w"),mo("&uminus0;"))`(Zeta, eta, tau)^2+(1/2)*`K__φxa`*h^2*`#mover(mi("φ",fontstyle = "normal"),mo("&uminus0;"))`(Zeta, eta, tau)^2+(1/2)*`K__ψxa`*h^2*`#mover(mi("ψ",fontstyle = "normal"),mo("&uminus0;"))`(Zeta, eta, tau)^2)*b, eta = -1 .. 1)+Int((1/2)*((1/2)*K__uy0*h^2*`#mover(mi("u"),mo("&uminus0;"))`(Zeta, eta, tau)^2+(1/2)*K__vyb*h^2*`#mover(mi("v"),mo("&uminus0;"))`(Zeta, eta, tau)^2+(1/2)*K__wyb*h^2*`#mover(mi("w"),mo("&uminus0;"))`(Zeta, eta, tau)^2+(1/2)*`K__φyb`*h^2*`#mover(mi("φ",fontstyle = "normal"),mo("&uminus0;"))`(Zeta, eta, tau)^2+(1/2)*`K__ψy0`*h^2*`#mover(mi("ψ",fontstyle = "normal"),mo("&uminus0;"))`(Zeta, eta, tau)^2)*a, Zeta = -1 .. 1)+Int((1/2)*((1/2)*K__uyb*h^2*`#mover(mi("u"),mo("&uminus0;"))`(Zeta, eta, tau)^2+(1/2)*K__vyb*h^2*`#mover(mi("v"),mo("&uminus0;"))`(Zeta, eta, tau)^2+(1/2)*K__wyb*h^2*`#mover(mi("w"),mo("&uminus0;"))`(Zeta, eta, tau)^2+(1/2)*`K__φyb`*h^2*`#mover(mi("φ",fontstyle = "normal"),mo("&uminus0;"))`(Zeta, eta, tau)^2+(1/2)*`K__ψyb`*h^2*`#mover(mi("ψ",fontstyle = "normal"),mo("&uminus0;"))`(Zeta, eta, tau)^2)*a, Zeta = -1 .. 1)

(1)

simplify(Ut)

(1/4)*(b*(Int(K__ux0*`#mover(mi("u"),mo("&uminus0;"))`(Zeta, _a, tau)^2+K__vx0*`#mover(mi("v"),mo("&uminus0;"))`(Zeta, _a, tau)^2+K__wx0*`#mover(mi("w"),mo("&uminus0;"))`(Zeta, _a, tau)^2+`K__φx0`*`#mover(mi("φ",fontstyle = "normal"),mo("&uminus0;"))`(Zeta, _a, tau)^2+`K__ψx0`*`#mover(mi("ψ",fontstyle = "normal"),mo("&uminus0;"))`(Zeta, _a, tau)^2, _a = -1 .. 1))+b*(Int(K__uxa*`#mover(mi("u"),mo("&uminus0;"))`(Zeta, _a, tau)^2+K__vxa*`#mover(mi("v"),mo("&uminus0;"))`(Zeta, _a, tau)^2+K__wxa*`#mover(mi("w"),mo("&uminus0;"))`(Zeta, _a, tau)^2+`K__φxa`*`#mover(mi("φ",fontstyle = "normal"),mo("&uminus0;"))`(Zeta, _a, tau)^2+`K__ψxa`*`#mover(mi("ψ",fontstyle = "normal"),mo("&uminus0;"))`(Zeta, _a, tau)^2, _a = -1 .. 1))+a*(Int(K__uy0*`#mover(mi("u"),mo("&uminus0;"))`(_a, eta, tau)^2+K__vyb*`#mover(mi("v"),mo("&uminus0;"))`(_a, eta, tau)^2+K__wyb*`#mover(mi("w"),mo("&uminus0;"))`(_a, eta, tau)^2+`K__φyb`*`#mover(mi("φ",fontstyle = "normal"),mo("&uminus0;"))`(_a, eta, tau)^2+`K__ψy0`*`#mover(mi("ψ",fontstyle = "normal"),mo("&uminus0;"))`(_a, eta, tau)^2, _a = -1 .. 1)+Int(K__uyb*`#mover(mi("u"),mo("&uminus0;"))`(_a, eta, tau)^2+K__vyb*`#mover(mi("v"),mo("&uminus0;"))`(_a, eta, tau)^2+K__wyb*`#mover(mi("w"),mo("&uminus0;"))`(_a, eta, tau)^2+`K__φyb`*`#mover(mi("φ",fontstyle = "normal"),mo("&uminus0;"))`(_a, eta, tau)^2+`K__ψyb`*`#mover(mi("ψ",fontstyle = "normal"),mo("&uminus0;"))`(_a, eta, tau)^2, _a = -1 .. 1)))*h^2

(2)

``

``


 

Download simplifyss.mw

 

But I amezed when I use simplify command deteriorate my eq.

 

Why?

Why I receive this error:



 

Download Dchange.mw

My subsection have so many lines of codes, sometimes I want to disable one subsection, is there simple way to disable one subsection? it is tedious to set # at each lines of the subsection.

Is there any way to say maple dont open specified subsection during the running?

First 11 12 13 14 15 16 17 Page 13 of 18