MaplePrimes Questions

Need help with write calculations in maple and ploting

The array ( a 3 by 4 )  has elements:

1,1,1,1

2,4,8,16

3 ,9,27,81

How to do this a nested loop ? : how to reasoning this in Maple with do loops 

Hello,

While working for an assignment I had to use a piecewise function which gives a result based on a randomly generated value. The following is a much simpler version of what I've been working on, but it gives the same error.

A random value is uniformly distributed between 0 and 100. The piecewise returns a 1 if the value is between 0 and 50 and it returns 2 if the value is between 50 and 100. As far as I understand this function should only ever give 1 or 2, never something else. However when I loop this a few times Maple regularly returns a 0, which doesn't make sense to me. I've printed the values that return a 0 but none of these should break the piecewise. Can someone please explain to me what's going wrong here and how to fix it?

My code:

restart; randir := piecewise(0 <= r1() and r1() < 50, 1, 50 <= r1() and r1() < 100, 2);
for i to 1000 do r1 := rand(0. .. 100.0); if randir = 0 then print(fail[i], r1()) end if end do;
 

I've included a failure check to see when and at what values it returns a 0, and as you can see it happens very often.

Hi there.

I noticed that in Maple 2020 default font size of document (Times New Roman 12) looking bigger than in previous versions. How can I make the view the same as in previous versions?

Thank you

What does the error message, "Error, (in monspt) invalid input: ArrayTools:-Reverse expects its 1st argument, A, to be of type rtable, but received [[0, 4], [1, 3], [2, 2], [3, 1], [4, 0], [0, 3], [1, 2], [2, 1], [3, 0], [0, 2], [1, 1], [2, 0], [0, 1], [1, 0], [0, 0]]
" exactly mean, and how to find the required rtable type, and how to make it work? Thanks a lot!

The plot is not showing two lines perpendicular ?

Can anyone help with ploting the movement of the body along the segment AB, BC this task?

restart;
alpha:=Pi/6: V[A]:=1: l:=3: f:=0.2: d:=2.5:
# The movement of the body along the segment AB
de:=m*diff(x1(t),t,t)=G*sin(alpha)-F[fr]:
G:=m*g: F[fr]:=m*g*f*cos(alpha): g:=9.81:
ics:=x1(0)=0, D(x1)(0)=V[A]:
de:=evalf(de/m);
B:=rhs(de);
sol:=dsolve({de,ics}, x1(t)); # The solution of de
fsolve(rhs(sol)=l);
tau:=evalf[3](%[2]);
V['B']:=B*tau+V[A];
 

diff(diff(x1(t), t), t) = 3.205858157

 

3.205858157

 

x1(t) = (3205858157/2000000000)*t^2+t

 

-1.715094465, 1.091236545

 

1.09

 

4.494385391

(1)

# The movement of the body along the curve BC
sys:=m*diff(x(t),t,t)=0, m*diff(y(t),t,t)=m*g;
ics_sys:=x(0)=0, y(0)=0, D(x)(0)=V['B']*cos(alpha), D(y)(0)=V['B']*sin(alpha):
Sol:=evalf(dsolve({sys, ics_sys})); # The solution of sys
T:=evalf(solve(eval(x(t),Sol)=d));
h:=evalf(eval(eval(y(t),Sol),t=T));
T:=evalf[2](T);
h:=evalf[3](h);   
 

m*(diff(diff(x(t), t), t)) = 0, m*(diff(diff(y(t), t), t)) = 9.81*m

 

{x(t) = 3.892251925*t, y(t) = 4.905000000*t^2+2.247192696*t}

 

.6423016927

 

3.466940605

 

.64

 

3.47

(2)

 


 

Download sol_Maple.mw

Hi there.

How supress this warning in Maple 2020 when I use "e" just like a variable not an exponent:

Warning, if e is meant to be the exponential e, use command/symbol completion or palettes to enter this special symbol, or use the exp function

?

Thank you

Hi there.

I found bugs in covariant differentiation of vectors that defined in another coordinate system. I attached three documents - two of them with bugs and one with normal behavior.

In cov_diff_bug_1.mw I defined Killing vector in Minkowski spacetime. Then I transformed metric and this vector to spherical coordinate system and calculated covariant derivative of vector and obtained symmetric tensor matrix. But for Killing vector it should be antisymmetric.

In cov_diff_bug_2.mw I set metric in spherical coordinate system by hand instead of transformation and obtained zero covariant derivative.

And in cov_diff_no_bug.mw I set metric and vector by hand without any transformation and obtained normal results - antisymmetric covariant derivative and zero sum of two covariant derivatives with rearranged indexes.

So in Maple 2020 coordinate transformation don't doing well in combining with covariant differentiation. But in previous versions of Maple this behavior could be opposite)

I'm asking developers to consider this issues.

Thank you.

cov_diff_bug_1.mw

cov_diff_bug_2.mw

cov_diff_no_bug.mw

 

Dears,
Someone to know install modules as pyautogui? 
ImportModule("pyautogui")
In my software gives the following message "Error, (in Python:-ImportModule) ModuleNotFoundError: No module named 'pyautogui' ['Traceback (most recent call last):\n', '  File "<string>", line 1, in <module>\n', "ModuleNotFoundError: No module named 'pyautogui'\n"]"
Or someone know about automation keyboard in Maplesoft?
Kind regards

 Dear Maple community, 
I am struggling with the numerical solution of the complex (linear) partial differential equation to obtain results. For example, I see such as this statement "Error, (in pdsolve/numeric/plot) unable to compute solution for t<HFloat(0.0): signum is not differentiable at complex values" pops up. I did my homework but I didn't get anything. I will be happy if someone could give me some suggestions or advice. Thank you in advance. 

Hi, need help with ploting task. Could someone help with this?

Task:

The svg generated by Export, for example, 

svg_code := Export(plot(x), target = direct, format = "svg");

is broken (the svg generated is invalid). 

Is there a fix for this issue?

If there is no fix, is there a way to output (to be assigned to a variable) a text (ascii) containing base64 encorded png of a plot.

Hello, so my maple won't solve any function involving either cos, tan or sin. Has anyone experienced this before or know how to fix it? 

For example i need to find: cos(30), but it comes up as cos(30) after I hit enter. 

 

Many thanks to anyone who tries to help! :)

Hi, I have a problem with solution task. Why eq2 doesn't accept value of x1?


restart;
P := 12; M := 6; q := 2; BC := 2; Q := q*BC; CN := (1/2)*BC; NB := CN; AK := 1; KC := AK*evalf(cot((1/6)*Pi)); KN := KC+CN; BK := NB+KN;
                            P := 12
                             M := 6
                             q := 2
                            BC := 2
                             Q := 4
                            CN := 1
                            NB := 1
                            AK := 1
                       KC := 1.732050808
                       KN := 2.732050808
                       BK := 3.732050808

eq1 := x1 = (P*evalf(cos((1/6)*Pi))-Q*sin((1/6)*Pi))/sin((1/6)*Pi);
                    eq1 := x1 = 16.78460970

eq2 := x2 = AK*P+BK*x1+KN*Q+M;
            eq2 := x2 = 3.732050808 x1 + 28.92820323

solve({eq1, eq2}, {x1, x2});
              {x1 = 16.78460970, x2 = 91.56921942}
NULL;
B := vector(2, [(P*evalf(cos((1/6)*Pi))-Q*sin((1/6)*Pi))/sin((1/6)*Pi), AK*P+BK*x1+KN*Q+M]);
        B := [16.78460970, 3.732050808 x1 + 28.92820323]

A := matrix(2, 2, [[1, 0], [0, 1]]);
                               [1  0]
                          A := [    ]
                               [0  1]

C := evalm(1/A);
                               [1  0]
                          C := [    ]
                               [0  1]

x := evalm(`&*`(C, B));
        x := [16.78460970, 3.732050808 x1 + 28.92820323]

 

First 551 552 553 554 555 556 557 Last Page 553 of 2428