MaplePrimes Questions

Hi,

I'm just trying Maple 2020.

In Maple 2016, a package may be loaded at restart by creating the file: 

c:\Program Files\Maple 2016\Users\maple.ini

and writing in it:

libname:= "F:\\Maple\\Trilinears", libname: 
currentdir("F:\\Maple\\Trilinears"):
libname:= "F:\\Maple\\mysql", libname:

 

But this does not work in Maple 2020.

What is the workaround for loading these packages when restart is executed?

Thanks in advance,

César Lozada

 

 

 

ApproxBayesComp_for_loop.mw

The observed data were 6 out 16 people signed up. Priors were defined by a uniform distribution. A Generative Model utilized a binomial distribution. A distribution of subscribers were generated, see plot below. By filtering the subscribers distribution for the value is equal 6, the posterior distribution was obtained. Why is the frequency the highest for subscribers = 16? Where did I go wrong in coding this problem?

how to draw and calculate the angle of a dihedral of a regular tetrahedron ? Thank you.

Dear maple users,

Greetings.

When converting the maple figure into EPS format (for latex) which shows white patches.

How to avoid such patches.

Hi

This Carl Code evaluates fine

MySumP:= (j::integer)->
    seq(combinat:-numbcomb((j+10),(i+10))*p^(j+i)*(1-p)^(j+i), i= 0..0);
:[MySumP(10)]


[184756*p^10*(1 - p)^10]

But what I would like is whats inside the numbcomb argument to be displayed.

i tried

MySumP:= (j::integer)->
    seq(combinat:-numbcomb(``(j+10),``(i+10))*p^(j+i)*(1-p)^(j+i), i= 0..0)
:

[MySumP(10)]

What i would like displayed: numbbomb(20,10)*p^10*(1-p)^10 or (better) C(20,10)*p^10*(1-p)^10

Hi,

Is there any way we could use Maple to simplify an equation,

Example: M= 2pqrst / uvw 

I would like a code or a way to separate some variables into one variable, where the expression would be M = 2Krst / w

which can be said that K = pq / uv

I know that I can use the simplify command but it's only worked for simpler expression but not complicated one.

Really need help from you guys. 

 

Thank you :)

How can I define and solve an ordinary differential equation with a random input (random inhomogeneous part)?

d2X(t)+c*dX(t)+k*X(t)=F(t)

where f(t) is a random function with normal distribution.


I tried to simplify it, but It didn't work that well.

simplify(%)

 

I always feel that this formula can be further simplified, but there is no way to start. Of course, My thoughts maybe incorrect. maybe this is the simplest form.

 

 

 

 

 

 

For last 4 hrs, I've been chasing this problem.

Inside a module, there is a proc with a name say foo().

It is local to the module. When creating an .mla file that contains this module which was read from .mpl file, and running a test against it, Maple does not see this specific proc foo() as a proc, but only sees it as a symbol.

So the call to foo() never happens (error is generated).

I have a print statement inside foo() also which never prints. In the debugger, when I try to step into foo(), it fails also. Maple simply does not see it as a proc.

I also added my_module:-foo() in call, but this made no difference, even though it is not needed to prefix the module name, since foo is a local proc.

Now, instead of making an .mla, I now just read the .mpl file directly which make up the module. And now run the same test, and now maple see foo() as proc and the test runs with no error.

No change in the code at all. Nothing changed, exacept the test is called one time when package is inside the .mla vs. just using plain .mpl files.  The module has option package on it.

It seems something goes wrong with symbol table when inside mla file.

When I do 

libname := currentdir(), libname;
LibraryTools:-Browse()

And browse the content inside my mla file, I see no problems, it lists all 24 procs inside the package, and I can see foo listed there as type PROC.

But in the code, what printing whattype(foo)  it says it is symbol when using mla file, but it says it is a procedure when not using mla, but just by reading the .mpl file which went into the .mla

I will try to make an example to reproduce this if I can. But has any one seen something like this before? What could cause this?  I've restarted Maple ofcourse, and this made no difference.

The way I build the mla is

FileTools:-Remove(cat(currentdir(),"/my.mla"));
LibraryTools:-Create(cat(currentdir(),"/my.mla"));

read cat(currentdir(),"/my_module.mpl");
LibraryTools:-Save('my_module',"my.mla");

For now, I will stop using .mla and just read the .mpl file each time to use the code, as this seems safer and this always worked and never gave any problems.

The code is large. I also use database. So I am not sure I can make a small example but will try.  

I am using 2020.1 on windows 10.

I am not able to use Maple's map() to do the following. Given 2 lists of things (of equal length), map a function that take 2 arguments, from these 2 lists, in order.  Here is an example to illustrate. In Mathematica

a = {1, 2, 3}; b = {7, 8, 9};
MapThread[f, {a, b}]

           {f[1, 7], f[2, 8], f[3, 9]}

In Maple, I tried map and map2, map[n] etc.. not able to get the result I want. I want to use map, and not ~

A:=[1,2,3];
B:=[7,8,9];
map((x,y)->f(x,y),A,B)

          [f(1, [7, 8, 9]), f(2, [7, 8, 9]), f(3, [7, 8, 9])]

 

map[2]((x,y)->f(x,y),A,B)

           [f([1, 2, 3], 7), f([1, 2, 3], 8), f([1, 2, 3], 9)]

and other things.

How to get same result as MapThread, using map?

In your answer, please include the calculation of the lamina's area and the location of its centre of mass.

Lamina.mw

Why doesn't this do the symbolic summation? Is there a way to get Maple to do it?

sum((-1)^n / n * x^n, n=1..infinity);

I have an expression  

product(q^(n -2)- q^i, i = 0 .. r )/product(q^(n-2) - q^(i+1), i = 0 .. r)

 

Obviously, it can be further simplified.

But in maple I can't do that, I use simplify and expand , all failed.

simplify(expand(%))

What should I do to get the simplified result I want?

 

Dear All,
I want to learn to work with Thread[Task] packages in Maple.However, I am confused when I studied the Help of Maple about. I can’t find out the Start and Continue command in the package. I can’t execute any simple program by Threads [Task]. The help of Maple has an example of the following:
with(Threads[Task]);
cont := proc( a, b )
   return a + b;
end proc;      
task := proc( i, j )
   local k;
   if ( j-i < 1000 ) then
       return add( k, k=i..j );
   else
       k := floor( (j-i)/2 )+i;
       Continue( cont, Task=[ task, i, k ], Task=[ task, k+1, j ] );
   end if;
end proc;
Start(task, 1, 10^7);

I want to remove if-clause in task procedure as the following. In the other words, I want to use multi-threads for any values of i and j. However, the program doesn’t work correctly. What hint is something I don’t correctly understand?

Besides, I may don’t find deeply out the meaning and deference of parent, leaf, child, and continuation tasks. would you explain to me those tasks easily? The help of Maple doesn't convey a unified explanation for them.
 
Please guide me to overcome the problem.
Best wishes,
 
with(Threads[Task]);
cont := proc( a, b )
   return a + b;
end proc;      
task := proc( i, j )
   local k;
        k := floor( (j-i)/2 )+i;
       Continue( cont, Task=[ task, i, k ], Task=[ task, k+1, j ] );
end proc;
Start(task, 1, 10^7);

We tryto  find a solution to the differential equation f'(x)=f^(-1)(x).

First 397 398 399 400 401 402 403 Last Page 399 of 2308