ijuptilk

100 Reputation

3 Badges

2 years, 126 days

MaplePrimes Activity


These are questions asked by ijuptilk

Please how can I export a matrix from maple to matlab

A := Matrix(5, 5, {(1, 1) = -.841752461600000, (1, 2) = -71.7787800100000, (1, 3) = 0.701877157500000e-2, (1, 4) = 0.672783592200000e-2, (1, 5) = 0.646005759700000e-2, (2, 1) = -.877557898000000, (2, 2) = -100., (2, 3) = 0.701617590500000e-2, (2, 4) = 0.672545092900000e-2, (2, 5) = 0.645785863600000e-2, (3, 1) = -1.00426692300000, (3, 2) = -.677765381900000, (3, 3) = 0.700840041000000e-2, (3, 4) = 0.671830608400000e-2, (3, 5) = 0.645127072200000e-2, (4, 1) = -1.31039754100000, (4, 2) = -.820833777300000, (4, 3) = 0.699547946600000e-2, (4, 4) = 0.670643167900000e-2, (4, 5) = 0.644032067900000e-2, (5, 1) = -2.17574621300000, (5, 2) = -1.15959068100000, (5, 3) = 0.697746998200000e-2, (5, 4) = 0.668987785500000e-2, (5, 5) = 0.642505292600000e-2})

I tried

ExportMatrix(matlabData, A, target=MATLAB,format=rectangular,mode=ascii);

 but didn't work. 

Hi, please can someone help on how non-dimensionalize PDEs. 

I have tried the following, but is not working:

restart:
eqn := (diff(theta(x, z, t), x))^2*(K[1]-K[3])*cos(theta(x, z, t))*sin(theta(x, z, t))+(diff(theta(x, z, t), x))*((diff(theta(x, z, t), z))*(-K[1]*cos(2*theta(x, z, t))+K[3]*cos(2*theta(x, z, t)))-(1/2)*gamma[1]*(4*sin(theta(x, z, t))^2*u(x, z, t)+2*u(x, z, t)*cos(2*theta(x, z, t))))+(diff(theta(x, z, t), z))^2*(K[3]-K[1])*cos(theta(x, z, t))*sin(theta(x, z, t))-(1/2)*gamma[1]*(diff(theta(x, z, t), z))*(4*sin(theta(x, z, t))^2*v(x, z, t)+2*v(x, z, t)*cos(2*theta(x, z, t)))+(diff(theta(x, z, t), z, x))*(-2*K[1]+2*K[3])*cos(theta(x, z, t))*sin(theta(x, z, t))-(diff(u(x, z, t), z))*((1/2)*gamma[2]*cos(2*theta(x, z, t))+(1/2)*gamma[1]*(2*sin(theta(x, z, t))^2+cos(2*theta(x, z, t))))-(diff(v(x, z, t), x))*((1/2)*gamma[2]*cos(2*theta(x, z, t))+(1/2)*gamma[1]*(-2*sin(theta(x, z, t))^2-cos(2*theta(x, z, t))))-(1/2)*gamma[1]*(4*sin(theta(x, z, t))^2*(diff(theta(x, z, t), t))+2*(diff(theta(x, z, t), t))*cos(2*theta(x, z, t)))+((diff(u(x, z, t), x))*gamma[2]-(diff(v(x, z, t), z))*gamma[2])*cos(theta(x, z, t))*sin(theta(x, z, t))+f[2](theta(x, z, t))*(diff(theta(x, z, t), x, x))+f[1](theta(x, z, t))*(diff(theta(x, z, t), z, z));

varchange := {t = T*tau, u = xi*h^2*U/alpha[4], v = xi*h^2*V/alpha[4], x = X*h, z = Z*h, K[3] = K[1]*k[3], f[1] = K[1]*F[1], f[2] = K[1]*F[2], gamma[1] = mu*Gamma[1], gamma[2] = mu*Gamma[2]};

PDEtools:-dchange(varchange, eqn, [tau, U, V, X, Z, k[3], F[1], F[2], GAMMA[1], GAMMA[2]]);

I have the following code below:

eq := -((2*(alpha[3]+alpha[2]))*((1/2)*cos(Theta(z, t))^2-(1/2)*sin(Theta(z, t))^2)+(alpha[3]-alpha[2])*(sin(Theta(z, t))^2+cos(Theta(z, t))^2))*(diff(U(z, t), z))-(alpha[3]-alpha[2])*(2*sin(Theta(z, t))^2*(diff(Theta(z, t), t))+2*cos(Theta(z, t))^2*(diff(Theta(z, t), t)))+(diff(Theta(z, t), z, z))*k

simplify(subs(simplify(coeff(eq, diff(U(z, t), z))) = t1, eq))

Please, why is maple not assigning t1 to the coefficient of diff(U(z, t), z)) in the expression? 

Hi, I have the equation below and I'm trying to use "collect " to get the coefficient of dudy^2 and dvdx^2. I tried

aa1 := subs({gamma[1] = alpha[3]-alpha[2], gamma[2] = alpha[6]-alpha[5]}, collect(aa, {dudy^2, dvdx^2}))

But is not collecting the coefficient of dvdx^2. Please can someone help?

aa := alpha[1]*(cos(theta(x, y, t))^4*dudx^2+2*cos(theta(x, y, t))^3*dudx*sin(theta(x, y, t))*dvdx+2*cos(theta(x, y, t))^3*dudx*sin(theta(x, y, t))*dudy+2*cos(theta(x, y, t))^2*dudx*sin(theta(x, y, t))^2*dvdy+cos(theta(x, y, t))^2*sin(theta(x, y, t))^2*dvdx^2+2*cos(theta(x, y, t))^2*sin(theta(x, y, t))^2*dvdx*dudy+2*cos(theta(x, y, t))*sin(theta(x, y, t))^3*dvdx*dvdy+cos(theta(x, y, t))^2*sin(theta(x, y, t))^2*dudy^2+2*cos(theta(x, y, t))*sin(theta(x, y, t))^3*dudy*dvdy+sin(theta(x, y, t))^4*dvdy^2)+(alpha[2]+alpha[3]+gamma[2])*(-dudx*cos(theta(x, y, t))*sin(theta(x, y, t))*thetadot-(1/2)*dudx*cos(theta(x, y, t))*sin(theta(x, y, t))*dudy+(1/2)*dudx*cos(theta(x, y, t))*sin(theta(x, y, t))*dvdx+(1/2)*cos(theta(x, y, t))^2*dvdx*thetadot-(1/4)*cos(theta(x, y, t))^2*dvdx^2+(1/2)*cos(theta(x, y, t))^2*dudy*thetadot+(1/4)*cos(theta(x, y, t))^2*dudy^2-(1/2)*sin(theta(x, y, t))^2*dvdx*thetadot+(1/4)*sin(theta(x, y, t))^2*dvdx^2-(1/2)*sin(theta(x, y, t))^2*dudy*thetadot-(1/4)*sin(theta(x, y, t))^2*dudy^2+dvdy*sin(theta(x, y, t))*cos(theta(x, y, t))*thetadot-(1/2)*dvdy*sin(theta(x, y, t))*cos(theta(x, y, t))*dvdx+(1/2)*dvdy*sin(theta(x, y, t))*cos(theta(x, y, t))*dudy)+alpha[4]*(dudx^2+(1/2)*dvdx^2+dvdx*dudy+(1/2)*dudy^2+dvdy^2)+(alpha[5]+alpha[6])*(cos(theta(x, y, t))^2*dudx^2+2*cos(theta(x, y, t))*dudx*((1/2)*dvdx+(1/2)*dudy)*sin(theta(x, y, t))+cos(theta(x, y, t))^2*((1/2)*dvdx+(1/2)*dudy)^2+2*cos(theta(x, y, t))*((1/2)*dvdx+(1/2)*dudy)*dvdy*sin(theta(x, y, t))+sin(theta(x, y, t))^2*((1/2)*dvdx+(1/2)*dudy)^2+sin(theta(x, y, t))^2*dvdy^2)+gamma[1]*(sin(theta(x, y, t))^2*thetadot^2+sin(theta(x, y, t))^2*dudy*thetadot-sin(theta(x, y, t))^2*dvdx*thetadot+(1/4)*sin(theta(x, y, t))^2*dudy^2-(1/2)*sin(theta(x, y, t))^2*dudy*dvdx+(1/4)*sin(theta(x, y, t))^2*dvdx^2+cos(theta(x, y, t))^2*thetadot^2-cos(theta(x, y, t))^2*dvdx*thetadot+cos(theta(x, y, t))^2*dudy*thetadot+(1/4)*cos(theta(x, y, t))^2*dvdx^2-(1/2)*cos(theta(x, y, t))^2*dudy*dvdx+(1/4)*cos(theta(x, y, t))^2*dudy^2)+xi*(cos(theta(x, y, t))^2*dudx+2*cos(theta(x, y, t))*sin(theta(x, y, t))*((1/2)*dvdx+(1/2)*dudy)+sin(theta(x, y, t))^2*dvdy);

Please, how do I fix this? I have

n := Vector[row]([cos(theta(x, y, t)), sin(theta(x, y, t))]);

and Tried :

sum(Multiply(n[i], n[i]), i = 1 .. 2)

But received: "Error, bad index into Vector".

1 2 3 4 5 6 Page 1 of 6