MaplePrimes Questions

How to convert barycentric coordinates to cartesian ? Thank you

Hello!

I just want to try plot a conformal map for better understanding how it works.

For example, I want to plot a conformal map, so I do this:

It works fine. But if I want to map more complecated region, I have lot's of problem. Could you help me please.

For example:

restart;
assume(y, real);
assume(x, real);
f := z -> I + z*exp(1/4*I*Pi);
w := f(x + y*I);
u := Re(w);
v := Im(w);
A := array(1 .. 2);
A[1] := plots:-conformal(z, z = 0 .. 1 + I/2, grid = [16, 16], numxy = [16, 16], scaling = constrained);
A[2] := plots:-conformal(f(z), z = 0 .. 1 + I/2, grid = [16, 16], numxy = [16, 16], scaling = constrained);
plots:-display(A);

how to map a triangle [0,0], [1,0], [0,i] or half-plane Im z> 1, excluding the circle | z - 2i | <= 1.

Thank you!

I want to approximate a positive function that is decreasing in Gamma, say f(Gamma), that is very complicated yet very smooth. I need this in order to obtain a tractable and compact version of its derivative, which enters in the partial derivative of another (very simple) function.

Along the way, three related questions emerge: Derivatives_and_Approximations.mw

Thanks a lot!

Hi,

I am attempting to illustrate various solids in Maple. How can I do this with ? (Figure 3 on my worksheet). Thank you

S5SolidQ.mw

Is there a way to manipulate an equation so that it is in the form of (Expression of Primary Variables)*(Expression of Secondary Variables)
In the example below from Video 1: Fast Analytical Techniques for Electrical and Electronic Circuits (youtube.com), the primary variables are R1 and R2

PS. When I type ctrl-v to insert an image, I always get 2 copies.

I got the proportional symbol to work once, typing "proportional" + CRTL + Space.  Went for wlak came back and could not get it to work at all.

Does it actually work or am I imagining things?

What's the correct command to return the number of elements in this command? It returns an expression sequence, but I didn't manage to get anything useful in return.

StringTools:-SearchAll("aba", "abababababababababab")

Greetings All,

This is an application for control theory, specifially using Maple to solve control problems in the area of Interconnection and Damping Assignment Passivity Based Control (IDA-PBC).

- Assuming two variables (iL and Vo), there is a potential function that I am trying to solve for called "Ha".  I have two equations here, and I want to solve for Ha using the pdsolve() command:  

eq1 := diff(Ha(iL, Vo), iL) = rhs(result[1]);
eq2 := diff(Ha(iL, Vo), Vo) = rhs(result[2]);
pdsolve( {eq1, eq2  } );

Once I do this, Maple gives me an expression for Ha that has arbitrary functions in it (I understand where these are coming from).  So far, so good.

--> In order to get help solving for these arbitrary functions, I also want to tell Maple some constraints.  For example:

"the Hessian matrix of Ha must be positive definite"

Is there a way to do this?

with(geometry);
with(LinearAlgebra);
xA := 1;
yA := 0;
xB := 0;
yB := 0;
xC := 0;
yC := 1;
Mat := Matrix(3, 3, [xA, xB, xC, yA, yB, yC, 1, 1, 1]);
Miv := MatrixInverse(Mat);
phi := (x, y) -> Transpose(Multiphy(Miv), <x, y, 1>);
for i to 6 do
    B || i := phi(xA || i, yA || i);
end do;
Error, (in LinearAlgebra:-Transpose) invalid input: too many and/or wrong type of arguments passed to LinearAlgebra:-Transpose; first unused argument is Vector(3, {(1) = xA1, (2) = yA1, (3) = 1})
How to correct this error ? Thank you.

First, I should mention that I am new to Maple. When I try to solve the below system of ODEs

sys_ode := diff(x(t), t) = -x(t)^2/(4*Pi*y(t)*(x(t)^2 + y(t)^2)), diff(y(t), t) = y(t)^2/(4*Pi*x(t)*(x(t)^2 + y(t)^2))

with initial conditions of 

ics := x(0) = 1, y(0) = 1

using the command 

sol_analytic := dsolve([sys_ode, ics])

I receive the below error of 

Error, (in dsolve) numeric exception: division by zero

Any help or guidance to resolve this is greatly appreciated.

Certainly a standard question.

I have an integer n*n matrix A (the entries are explicitly integers; there is no variable -type x- in the matrix). I want the Smith normal form of A, that is A=UDV where U,V are integer matrices with determinant +-1 and D is a diagonal matrix with -eventually- some zero and positive integers d_i s.t. d_i divides d_{i+1}.

"SmithForm()" doesn't work directly (I get rational -non integer- matrices). Maybe it is necessary to declare the matrix A as 'Matrix(integer)' ...
Thank you in advance for your help.

Hello,

In my the script a determinant of a matrix is set equal to 0 and then solved for. This formula has infinite solutions. So i will find the second root with: Student:-Calculus1:-Roots(Y, N = 0 .. limit, numeric) . This gives me several solutions and then i pick the second one as this is the critical buckling load of the column with the current parameters. 

Everytime i change a parameter i need to rerun a part of the script. I would like to generate a table where i define lets say parameter A and B and then run the script to give me value Ncr. then repeat this a 100 times with diferent parameters to see the influence of the parameters. 

Ive been looking around but i am not able to figure this one out. I think something like this should be possible? Thank you very much in advance!

 

A B Ncr
0,1 0,1  
0,1 0,5  
0,1 1  
0,5 0,1  
0,5 0,5  
0,5 1  
1 0,1  
1 0,5  
1 1  

 

Has anybody been able to get Maple working on macOS Sonoma 14.4. I know it's not supported yet, but I thought there might be someone who has solved the issue with the app crashing immediately after startup.

The overloaded  procedure here test returns based on 2 lists or 3 lists entered. The two list has a mixed input type with a default value. The default value of "a" can cause a problem if an explicit value in not entered for "a" in foo1. I not sure is the mixed input type is adding to the problem.
By changing the order of the procedures the problem is avoidable here. But this just a simple example. When there are 6 or so procedures it can be very difficult to select a correct ordering.

Is there a way around this, apart from don't have default values?

I could experiment with changing the input order in each proc but that would break up some logical input sequences on me.

restart

 

foo:=overload([
                        proc(P1::list,P2::list,a::algebraic:=4,$)
                         option overload;
                         print("2 lists");
                          end proc,

                       proc(P1::list,P2::list,P3::list,$)
                         option overload;
                         print("3 lists");
                          end proc
                       ]);

proc () option overload; [proc (P1::list, P2::list, a::algebraic := 4, ` $`) option overload; print("2 lists") end proc, proc (P1::list, P2::list, P3::list, ` $`) option overload; print("3 lists") end proc] end proc

(1)

foo([1,2],[3,4])

"2 lists"

(2)

foo([1,2],[3,4],[4,7])

"3 lists"

(3)

 

 

 

foo1:=overload([
                        

                       proc(P1::list,P2::list,P3::list,$)
                         option overload;
                         print("3 lists");
                          end proc,

                        proc(P1::list,P2::list,a::algebraic:=4,$)
                         option overload;
                         print("2 lists");
                          end proc
                       ]);

proc () option overload; [proc (P1::list, P2::list, P3::list, ` $`) option overload; print("3 lists") end proc, proc (P1::list, P2::list, a::algebraic := 4, ` $`) option overload; print("2 lists") end proc] end proc

(4)

foo1([1,2],[3,4]); #incorrect output

"3 lists"

(5)

foo1([1,2],[3,4],4)

"2 lists"

(6)

foo1([1,2],[3,4],[4,7])

"3 lists"

(7)

 

Download 2024-02-3_Q_Overload_proc_.mw