MaplePrimes Questions

Search Questions:

Latest Questions Latest Questions Feed

Hello,

 

I got two problems creating a 3d-plot. First, as the title mentions, I want to cut out a distinct interval from my 3d-Plot.

For example when the graph is displayd from -y_max to y_max but I just want it to be shown from -y_max to -5 and from 5 to y_max again.

I also got a second question:

Another thing I want to do with this graph is redefining this axis with a parameter which is directly dependant from it.

Like for example I want to redefine the "y" axis with a" k" axis with k=y*2, so that in the end I have th

Hi 

Sometimes this happen to me.

why ?  and how can I fix it?

Please recover the content of the attached file if it is possible

Thanks

Check.mw

Hi dear experts

I'm wrote a complicated code for stress computation and define each component of stresses for n layers in a n dimension array.

for example (for srr component):  srr[1]:=f1(r,theta) , srr[2]=f2... , ..., srr[n]=fn(r,theta)

n is defined in the start of worksheet and is no. of layers!

so, i want to plot all of layer functions in a same coordinate plane.( beacause they are discontinuse and i want show that)

note: display command don't do that and plot them in a table form! :(

how can i do that?

 

thanks for participate.

My question is related to changing the plot size and modifying the number of ticks.

For example, I am plotting y vs. x, and x is from -1.0*Pi/2..1.0*Pi/2. I want to modify the plot size with size=[h,w]. If I have three ticks in x-axis if I change to small width, then the number of ticks is decreased. How can I force it to have the certain number of ticks? Also, why if I set view=[-1.0*Pi/2..1.0*Pi/2,0..1] then the -1.0*Pi/2 disappear if the width size is small. 

Thanks,

Baharm31

Hello people in the mapleprimes,

I have a question, so I hope someone give me answers to it.

I calculated for the solution of the follwing differential equation.

restart
b:=diff(y(x),x)+a*y(x)=f(x);#where a and f(x) is not specified.
dsolve(b,y(x));

subs({f(x)=exp(x),a=2},%);where f(x) and a are specified.

c:=value(%);

The solution of the above was

y(x) = (1/3)*exp(x)+_C1/(exp(x))^2,  (A)

where please note that the second term takes

the form of fraction _C/(exp(x))^2.

 

On the other hand, next I calculated the following differential equation where f(x) and a are specified from the start.

restart
d:=diff(y(x),x)+2*y(x)=exp(x);

dsolve(b,y(x));

Then,

y(x) = (1/3)*exp(x)+exp(-2*x)*_C1  (B)

was the obtained solution.

 

Each (A) and (B) are the same substantially mathematically. But, for Maple, the variable powered to minus brabra

is not the same as one over variable powered to brabra, so that (A) and (B) takes different forms, and maple will see them 

different with each other.

 

  Surely, with algsubs, algsubs(_C1/(exp(x))^2=exp(-2*x)*_C1,c) transforms (A) to (B).

But, I want to know whether there are some other ways than that  to modify (A) to (B).

If there are any good ways for it, I will be happy if you teach them to me.

Thanks in advance.

 

taro

Hi, I am new to maple, but I think that my question should be simple.

I have a matrix where each element is an expression. I want to compute the matrix for different constant and to save it without crushing the previous matrix. 

If the file that I joined, I have a first part where the constant are defined. In the second part the expression of the matrix is defined. Finally, I compute each matrix with different constant. Each results is called C_p0, C_s0, C_g0. When I called them back, only the last matrix computed remains.

I would like to be able to save each matrix to performed operation on them later.

Thank you. 

 

Forum_Question1.mw

Homogénéisation

 

restart; with(plots); with(DifferentialGeometry); with(LinearAlgebra); with(Physics)

  NULL

Paramètre des matériaux

 

p[p] := [34.68, 34.82]:
NULL

 

NULLNULL

Tenseurs Élémentaires

 

NULL

Tenseur de rigidité

 

V := 1/((1+upsilon[23])*(-2*upsilon[12]*upsilon[21]-upsilon[23]+1)); G[12] := E/(2*(1+upsilon[12])); C[11] := (-upsilon[23]^2+1)*V*E[1]; C[22] := (-upsilon[12]*upsilon[21]+1)*V*E[2]; C[12] := upsilon[21]*(1+upsilon[23])*V*E[2]; C[23] := (upsilon[12]*upsilon[21]+upsilon[23])*V*E[2]; C[44] := (1/2)*(-2*upsilon[12]*upsilon[21]-upsilon[23]+1)*V*E[2]; C[55] := E[6]; C[33] := C[22]; C[13] := C[12]; C[66] := C[55]; C[21] := C[12]; C[32] := C[23]; C[iso] := Matrix(6, 6, {(1, 1) = C[11], (1, 2) = C[12], (1, 3) = C[12], (1, 4) = 0, (1, 5) = 0, (1, 6) = 0, (2, 1) = C[21], (2, 2) = C[22], (2, 3) = C[23], (2, 4) = 0, (2, 5) = 0, (2, 6) = 0, (3, 1) = C[21], (3, 2) = C[32], (3, 3) = C[22], (3, 4) = 0, (3, 5) = 0, (3, 6) = 0, (4, 1) = 0, (4, 2) = 0, (4, 3) = 0, (4, 4) = C[44], (4, 5) = 0, (4, 6) = 0, (5, 1) = 0, (5, 2) = 0, (5, 3) = 0, (5, 4) = 0, (5, 5) = C[66], (5, 6) = 0, (6, 1) = 0, (6, 2) = 0, (6, 3) = 0, (6, 4) = 0, (6, 5) = 0, (6, 6) = C[66]})

Matrice de rigidité

 

upsilon[23] := upsilon[p]:

Matrix([[C[11], C[12], C[12], 0, 0, 0], [C[21], C[22], C[23], 0, 0, 0], [C[21], C[32], C[22], 0, 0, 0], [0, 0, 0, C[44], 0, 0], [0, 0, 0, 0, C[66], 0], [0, 0, 0, 0, 0, C[66]]])

(1.2.1.1.1)

upsilon[23] := upsilon[s]:

Matrix([[C[11], C[12], C[12], 0, 0, 0], [C[21], C[22], C[23], 0, 0, 0], [C[21], C[32], C[22], 0, 0, 0], [0, 0, 0, C[44], 0, 0], [0, 0, 0, 0, C[66], 0], [0, 0, 0, 0, 0, C[66]]])

(1.2.1.1.2)

upsilon[23] := upsilon[g]:

Matrix([[C[11], C[12], C[12], 0, 0, 0], [C[21], C[22], C[23], 0, 0, 0], [C[21], C[32], C[22], 0, 0, 0], [0, 0, 0, C[44], 0, 0], [0, 0, 0, 0, C[66], 0], [0, 0, 0, 0, 0, C[66]]])

(1.2.1.1.3)

``

C[p0];

Matrix([[C[11], C[12], C[12], 0, 0, 0], [C[21], C[22], C[23], 0, 0, 0], [C[21], C[32], C[22], 0, 0, 0], [0, 0, 0, C[44], 0, 0], [0, 0, 0, 0, C[66], 0], [0, 0, 0, 0, 0, C[66]]])

(1)

``

 

Hello,

In the context of solving mechanical constraint equations, I often need to simplify trigonometric equation. In mathematica, the FullSimplify function makes the simplification I need. But, i'm using Maple for a long time and I would rather contnue my calculation with Mathematica.

May you see if so can help me to simplify this equation ?

Here the equation I would like to simplify with Maple :

TrigonometricEquation.mw

Here the result obtained with mathematica

résultatMma.pdf

Thanks a lot for your help

Hi,

I have this out put, let me put it simply as a  single variable(call it A) having multiple outputs such that when i print(A) I get         a
                           b
                           c
                           d
How do i put all the values in a single list to get [a,b,c,d]?

This is what I did: aa:=[]: for i in A do aa:=[op(aa),i]:od:
The output is [a]
                    [b]
                    [c]
                    [d]

How do I get [a,b,c,d] without doing a lot of op???

Thanks,
Vic

Hi,

I have this 5 by 2 matrix, and I want to form  lists of lengths 5, whereby the ith entry in my list should be any of the elements from the ith row of the matrix. How do i get all the possible lists? (I am expecting a total of 32lists, each of length 5):

The following is the log file after running a code file,

Extrema_Network := table([])

Extrema_Network[Han] := [20.0, 385.61]

Extrema_Network[Liv] := [20.0, 385.61]

Extrema_Network[Vir] := [20.0, 385.61]

values := [[2.8274333874308139146163, 2 Pi]]

theta_step := 0

phi_step := 0

counter_theta := 0

counter_phi := 0


distance eff distance_eff
im in has not
im in has not
im in has not
im in has not
im in has not
im in has not
im in has not
im in has not
im in has not
Im in has par
Im in has par
the time offset for Han was .71848e-2*cos(lat_begin)*cos(long_begin)+.12746e-1*cos(lat_begin)*sin(long_begin)-.15394e-1*sin(lat_begin)
the time offset for Liv was .24690e-3*cos(lat_begin)*cos(long_begin)+.18302e-1*cos(lat_begin)*sin(long_begin)-.10809e-1*sin(lat_begin)
the time offset for Vir was -.15117e-1*cos(lat_begin)*cos(long_begin)-.28029e-2*cos(lat_begin)*sin(long_begin)-.14657e-1*sin(lat_begin)
the angles with the coordinate axis are [long_begin-3.1416, 1.5708+lat_begin]
Using logChirp

common factor in Signal() was .43329e-21

Using logChirp

common factor in Signal() was .43329e-21

Using logChirp

common factor in Signal() was .43329e-21

snr_network was (187.00-.48032e-3*(1.+sin(lat_begin))^(1/2)*(1.-1.*sin(lat_begin))^(1/2)*sin(lat_begin)^2*sin(long_begin)-378.50*(1.+sin(lat_begin))^(1/2)*(1.-1.*sin(lat_begin))^(1/2)*sin(lat_begin)*sin(long_begin)-247.94*(1.+sin(lat_begin))^(1/2)*(1.-1.*sin(lat_begin))^(1/2)*sin(lat_begin)^3*cos(long_begin)^3-56.997*(1.+sin(lat_begin))^(1/2)*(1.-1.*sin(lat_begin))^(1/2)*sin(lat_begin)^3*cos(long_begin)-31.130*(1.+sin(lat_begin))^(1/2)*(1.-1.*sin(lat_begin))^(1/2)*sin(lat_begin)*cos(long_begin)^3+32.512*(1.+sin(lat_begin))^(1/2)*(1.-1.*sin(lat_begin))^(1/2)*sin(lat_begin)^3*sin(long_begin)+196.54*(1.+sin(lat_begin))^(1/2)*(1.-1.*sin(lat_begin))^(1/2)*sin(lat_begin)*cos(long_begin)+.65598e-3*(1.+sin(lat_begin))^(1/2)*(1.-1.*sin(lat_begin))^(1/2)*sin(lat_begin)^2*cos(long_begin)-.13119e-2*(1.+sin(lat_begin))^(1/2)*(1.-1.*sin(lat_begin))^(1/2)*sin(lat_begin)^2*cos(long_begin)^3+64.585*(1.+sin(lat_begin))^(1/2)*(1.-1.*sin(lat_begin))^(1/2)*sin(lat_begin)^3*cos(long_begin)^2*sin(long_begin)-61.911*(1.+sin(lat_begin))^(1/2)*(1.-1.*sin(lat_begin))^(1/2)*sin(lat_begin)*cos(long_begin)^2*sin(long_begin)+110.68*(1.+sin(lat_begin))^(1/2)*(1.-1.*sin(lat_begin))^(1/2)*sin(lat_begin)^3*sin(long_begin)^2*cos(long_begin)-375.04*(1.+sin(lat_begin))^(1/2)*(1.-1.*sin(lat_begin))^(1/2)*sin(lat_begin)*sin(long_begin)^2*cos(long_begin)+.85041e-3*(1.+sin(lat_begin))^(1/2)*(1.-1.*sin(lat_begin))^(1/2)*sin(lat_begin)^2*cos(long_begin)^2*sin(long_begin)+.10495e-3*(1.+sin(lat_begin))^(1/2)*(1.-1.*sin(lat_begin))^(1/2)*sin(lat_begin)^2*sin(long_begin)^2*cos(long_begin)-.49247e-3*sin(lat_begin)^3+260.07*cos(long_begin)^4+.16559e-3*cos(long_begin)^4*sin(lat_begin)+.16559e-3*sin(lat_begin)^3*cos(long_begin)^4+.90222e-3*sin(lat_begin)^3*cos(long_begin)^2-.12334e-2*sin(lat_begin)*cos(long_begin)^2-268.44*cos(long_begin)^2+102.34*sin(long_begin)*cos(long_begin)-590.30*sin(lat_begin)^2*cos(long_begin)^2-312.01*sin(lat_begin)^4*cos(long_begin)^2-102.19*sin(lat_begin)^4*sin(long_begin)^2+260.07*sin(lat_begin)^4*cos(long_begin)^4+650.59*sin(lat_begin)^2*cos(long_begin)^4+114.40*cos(long_begin)^3*sin(long_begin)+33.292*sin(long_begin)^2*cos(long_begin)^2-.11326e-2*cos(long_begin)^3*sin(lat_begin)*sin(long_begin)-.85371e-4*sin(long_begin)^2*cos(long_begin)^2*sin(lat_begin)-.11326e-2*sin(lat_begin)^3*cos(long_begin)^3*sin(long_begin)+.49010e-3*sin(lat_begin)^3*sin(long_begin)*cos(long_begin)-.85371e-4*sin(lat_begin)^3*sin(long_begin)^2*cos(long_begin)^2-394.84*sin(lat_begin)^2*sin(long_begin)*cos(long_begin)+287.80*sin(lat_begin)^4*sin(long_begin)*cos(long_begin)+114.40*sin(lat_begin)^4*cos(long_begin)^3*sin(long_begin)-219.38*sin(lat_begin)^2*cos(long_begin)^3*sin(long_begin)+33.292*sin(lat_begin)^4*sin(long_begin)^2*cos(long_begin)^2+1085.5*sin(lat_begin)^2*sin(long_begin)^2*cos(long_begin)^2+.64246e-3*sin(lat_begin)*sin(long_begin)*cos(long_begin)+157.13*sin(long_begin)^2-54.941*sin(lat_begin)^2*sin(long_begin)^2+78.538*sin(lat_begin)^4+27.150*sin(lat_begin)^2+.57530e-3*sin(lat_begin))^(1/2)
low_fisher for detector Han was


Error, (in fprintf) number expected for floating point format
13

32

31

17

hou := 0

mini := 0

seci := 0

memory used=26.3MB, alloc=32.3MB, time=0.47




Not quite sure why I am getting this error. Also this code was written in maple 14 and I am using maple 17. Could that also explain why I am getting all these errors? Is it possible to downgrade maple 17 to maple 14? Sorry if my question above on fprintf is a bit too cryptic as it is research work. I will upload the code file in a reply.

DEAR SIR,

PLEASE HELP ME WITH THAT QUESTION

 

DEAR SIR

ANYONE CAN HELP TO COMPUTE TIME IN DSOLVE COMMAND?

restart

with(plots)

Nb := 0.1e-4; Nt := 0.1e-4; Sc := 3.0; Sb := 15; Pe := 1; Bi := .5; Pr := 6.8; c[4] := 0; c[6] := .3; c[8] := .4; k[1] := 0; k[2] := 1; k[3] := 0; Un := .1; M := .5

Eq1 := (101-100*lambda)*(1+c[2]*phi(eta))*(diff(f(eta), `$`(eta, 3)))+(diff(f(eta), `$`(eta, 2)))*(f(eta)+g(eta)+c[2]*(diff(phi(eta), eta)))-(diff(f(eta), eta))^2-M*(diff(f(eta), eta)-k[2])+k[2]+Un*(k[2]-(1/2)*eta*(diff(f(eta), `$`(eta, 2)))-(diff(f(eta), eta))) = 0

(101-100*lambda)*(1+c[2]*phi(eta))*(diff(diff(diff(f(eta), eta), eta), eta))+(diff(diff(f(eta), eta), eta))*(f(eta)+g(eta)+c[2]*(diff(phi(eta), eta)))-(diff(f(eta), eta))^2-.6*(diff(f(eta), eta))+1.6-0.5000000000e-1*eta*(diff(diff(f(eta), eta), eta)) = 0

(1)

Eq2 := (101-100*lambda)*(1+c[2]*phi(eta))*(diff(g(eta), `$`(eta, 3)))+(diff(g(eta), `$`(eta, 2)))*(f(eta)+g(eta)+c[2]*(diff(phi(eta), eta)))-(diff(g(eta), eta))^2-M*(diff(g(eta), eta)-k[2])+k[2]+Un*(k[2]-(1/2)*eta*(diff(g(eta), `$`(eta, 2)))-(diff(g(eta), eta))) = 0

(101-100*lambda)*(1+c[2]*phi(eta))*(diff(diff(diff(g(eta), eta), eta), eta))+(diff(diff(g(eta), eta), eta))*(f(eta)+g(eta)+c[2]*(diff(phi(eta), eta)))-(diff(g(eta), eta))^2-.6*(diff(g(eta), eta))+1.6-0.5000000000e-1*eta*(diff(diff(g(eta), eta), eta)) = 0

(2)

Eq3 := (1+c[4]*phi(eta))*(diff(theta(eta), `$`(eta, 2)))+Pr*(diff(theta(eta), eta))*(f(eta)+g(eta))+Nb*Pr*(diff(theta(eta), eta))*(diff(phi(eta), eta))*(1+c[6]*(2*phi(eta)+1))+Nt*Pr*(diff(theta(eta), eta))^2+c[4]*(diff(theta(eta), eta))*(diff(phi(eta), eta))-(1/2)*Pr*eta*Un*(diff(theta(eta), eta)) = 0

diff(diff(theta(eta), eta), eta)+6.8*(diff(theta(eta), eta))*(f(eta)+g(eta))+0.68e-4*(diff(theta(eta), eta))*(diff(phi(eta), eta))*(1.3+.6*phi(eta))+0.68e-4*(diff(theta(eta), eta))^2-.3400000000*eta*(diff(theta(eta), eta)) = 0

(3)

Eq4 := (1+c[6]*phi(eta))*(diff(phi(eta), `$`(eta, 2)))+Sc*(f(eta)+g(eta))*(diff(phi(eta), eta))+c[6]*(diff(phi(eta), eta))^2+Nt*(diff(theta(eta), `$`(eta, 2)))/Nb-(1/2)*Sc*eta*Un*(diff(phi(eta), eta)) = 0

(1+.3*phi(eta))*(diff(diff(phi(eta), eta), eta))+3.0*(f(eta)+g(eta))*(diff(phi(eta), eta))+.3*(diff(phi(eta), eta))^2+1.000000000*(diff(diff(theta(eta), eta), eta))-.1500000000*eta*(diff(phi(eta), eta)) = 0

(4)

Eq5 := (1+c[8]*phi(eta))*(diff(chi(eta), `$`(eta, 2)))+c[8]*(diff(phi(eta), eta))*(diff(chi(eta), eta))-Pe*(chi(eta)*(diff(phi(eta), `$`(eta, 2)))+(diff(phi(eta), eta))*(diff(chi(eta), eta)))+Sb*(diff(chi(eta), eta))*(f(eta)+g(eta))-(1/2)*Sb*eta*Un*(diff(chi(eta), eta)) = 0

(1+.4*phi(eta))*(diff(diff(chi(eta), eta), eta))-.6*(diff(phi(eta), eta))*(diff(chi(eta), eta))-chi(eta)*(diff(diff(phi(eta), eta), eta))+15*(diff(chi(eta), eta))*(f(eta)+g(eta))-.7500000000*eta*(diff(chi(eta), eta)) = 0

(5)

Vc[2] := [.2, .3, .4]

etainf := 1.85

bcs := (D(f))(0) = k[1], (D(g))(0) = k[3], f(0) = 0, g(0) = 0, (D(theta))(0) = -Bi*(1-theta(0))/(1+c[4]*phi(0)), Nb*(D(phi))(0)*(1+c[6]*(2*phi(0)+1))+Nt*(D(theta))(0) = 0, chi(0) = 1, (D(f))(etainf) = k[2], (D(g))(etainf) = k[2], theta(etainf) = 0, phi(etainf) = 0, chi(etainf) = 0

(D(f))(0) = 0, (D(g))(0) = 0, f(0) = 0, g(0) = 0, (D(theta))(0) = -.5+.5*theta(0), 0.1e-4*(D(phi))(0)*(1.3+.6*phi(0))+0.1e-4*(D(theta))(0) = 0, chi(0) = 1, (D(f))(1.85) = 1, (D(g))(1.85) = 1, theta(1.85) = 0, phi(1.85) = 0, chi(1.85) = 0

(6)

dsys := {Eq1, Eq2, Eq3, Eq4, Eq5, bcs}

for i to 3 do c[2] := Vc[2][i]; dsol[i] := dsolve(dsys, numeric, continuation = lambda); print(c[2]); print(dsol[i](0)) end do

.2

 

[eta = 0., chi(eta) = HFloat(1.0), diff(chi(eta), eta) = HFloat(3.888290578689045), f(eta) = HFloat(0.0), diff(f(eta), eta) = HFloat(0.0), diff(diff(f(eta), eta), eta) = HFloat(2.244199282192492), g(eta) = HFloat(0.0), diff(g(eta), eta) = HFloat(0.0), diff(diff(g(eta), eta), eta) = HFloat(2.244199282192492), phi(eta) = HFloat(-2.044191234673432), diff(phi(eta), eta) = HFloat(5.227515304629519), theta(eta) = HFloat(0.2317093657771352), diff(theta(eta), eta) = HFloat(-0.38414531711143246)]

 

.3

 

[eta = 0., chi(eta) = HFloat(1.0), diff(chi(eta), eta) = HFloat(4.148187853914835), f(eta) = HFloat(0.0), diff(f(eta), eta) = HFloat(0.0), diff(diff(f(eta), eta), eta) = HFloat(3.1086884419918364), g(eta) = HFloat(0.0), diff(g(eta), eta) = HFloat(0.0), diff(diff(g(eta), eta), eta) = HFloat(3.1086884419918364), phi(eta) = HFloat(-2.049332060722701), diff(phi(eta), eta) = HFloat(5.527786294980874), theta(eta) = HFloat(0.2216792480031605), diff(theta(eta), eta) = HFloat(-0.38916037599841974)]

 

.4

 

[eta = 0., chi(eta) = HFloat(0.9999999999999998), diff(chi(eta), eta) = HFloat(4.580796631072469), f(eta) = HFloat(0.0), diff(f(eta), eta) = HFloat(0.0), diff(diff(f(eta), eta), eta) = HFloat(5.687607599246298), g(eta) = HFloat(0.0), diff(g(eta), eta) = HFloat(0.0), diff(diff(g(eta), eta), eta) = HFloat(5.687607599246298), phi(eta) = HFloat(-2.0568809171520708), diff(phi(eta), eta) = HFloat(6.0203396482123575), theta(eta) = HFloat(0.20686299926628238), diff(theta(eta), eta) = HFloat(-0.39656850036685887)]

(7)

NULL

 

 

Download 3DAKc2w_-_Copy.mw

I have a gensym routine (gensym = generate symbol) which appends Chinese characters to some base symbols to create 'new' symbols.  This works well on Windows, Mac and tty maple.  But I get all square boxes in the linux GUI.

I know the fonts exist as, on the same machine, it works in tty.  But I have no idea how to tell the GUI to go and use those fonts.  Nor why it isn't.

Amusingly, if I try to paste something from the GUI as MapleMath here on Primes, in the 'paste' box, it shows just fine, but then it says it is invalid Maple.

For example, from the GUI I see

but the same thing in TTY is

(x三0不 + x三1下)^(-M)

and I just did cut-and-paste of the same thing.  By this I mean that I took that output with boxes above, put it into a terminal window, re-copied that, pasted it in here, and voila!

So clearly the issue is with the GUI, and only on linux (Ubuntu 16.04).

I am curious about the numerical method(s) used by Maple to calculate fsolve. I've looked at the documentation (https://www.maplesoft.com/support/help/maple/view.aspx?path=fsolve%2fdetails), but the method(s) used are not stated on there. Does anyone know which method Maple uses in fsolve? Additionally, does Maple use multiple methods and if so, how does it determine which one to use? Thanks!

1 2 3 4 5 6 7 Last Page 2 of 1325