Maple 2017 Questions and Posts

These are Posts and Questions associated with the product, Maple 2017

Hello!

Assume we have the first N positive integres, 1,..,N, and we assing to these numbers a (discrete) probability distribution p1,...,pN. Of course, p1+...+pN=1.

Then, How can we select a number in {1,..,N} according to the given probability distribution? That is, the number 1 can be chosen with probability p1, 2 with a probability p2, etc.

Many thanks in advance for your comments.

My goal is to generate incremental values of a function to plot using dataplot. Why does the first example generate numeric values in the Vector and the second example does not?

fenq := f -> 2.1^(f+1):
pf := Vector(5, fenq)
                             [  4.41   ]
                              [  9.261  ]
                         pf := [ 19.4481 ]
                              [40.84101 ]
                             [85.766121]
fseqn := (Se, f) -> Se^(f+1):
psf := Vector(5, fsenq(2.1, j))
 

I can plot the first data set using dataplot(pf). I cannot plot the second data set.

The command print placed within a while loop does not produce any printout. How do I  make MAPLE to produce  it?

I am trying to animate two variables in a 3D plot. Basically I would like to combine these two animations into one simultaneous animation:

animate(plot3d, [[y, x, (1/3)*Pi], x = 0 .. 2*Pi, y = 0 .. R, coords = spherical, scaling = constrained], R = 0 .. 5)

and

animate(plot3d, [[y, x, (1/3)*Pi], x = 0 .. p, y = 0 .. 5, coords = spherical, scaling = constrained], p = 0 .. 2*Pi)

so that both animations start and end simultaneously. Is this possible?

Thanks in advance.


 

M := `<,>`(`<|>`(1, 2, 3), `<|>`(4, 5, 6), `<|>`(7, 8, 9))

Matrix(%id = 18446745804653824710)

(1)

b := `<|>`(10, 11, 12)

Vector[row](%id = 18446745804653819654)

(2)

M+b

Error, (in rtable/Sum) invalid input: dimensions do not match: Matrix(1 .. 3, 1 .. 3) cannot be added to Vector[row](1 .. 3)

 

``

Of course the above addition will throw an error because M and b have different dimensions. But if broadcasting was allowed, then the row vector b is added to each row in the matrix M. For example, in Python:

 

 

Is there a similar feature in Maple?


 

Download question.mw

Hi,

      I need to compute something involved with the pseudo differential operators.

https://en.wikipedia.org/wiki/Pseudo-differential_operator

Specifically, I need to calculate the inverse of a pseudo differential operator, the multiplication of two pseudo differential operators, and the n-th root of a pseudo differential operator. 

I don't know whether Maple could handle these. 

Thanks.

Hi. I hope this question is not a duplicate of my previous question. Fundiff function results in dirac terms in an equation. Are there commands that simply differentiates a term that is a function of (t) in an equation without involving diracs?

How can I compute MatrixInverse, MatrixMultiply and eigenvalues(eigenvectors) faster? are there any procedures or commands that can be used instead of those three command mentioned before to speed up calculations?

1.mw

In the above document, digits must be 30.

Say I have three (3d if it matters) plot objects, which I will call A,B,C.

I need to plot A and B on the same graph and C on a different graph.

To plot objects on different graphs I would normally use an array of plots, and to plot objects on the same graph, I would use a set of plots. So what comes natural to me is this:

V:=Array(1..2):

V[1]:={A,B}:
V[2]:=C:

display(V)

However, this results in

Error, (in plots:-display) element 1 of the rtable is not a valid plot structure

 The problem is in the first element V[1] - Maple wants a plot, and not a set of plots, as each element of the array.

Another attempt which fails is the following:
 

display({A,B},C)

Here Maple will only plot {A,B} and ignore C.

I have had limited success with

 
display({A,B}), display(C)

which in fact works for the purpose stated above - it will produce the plots of {A,B} and C side by side.

However, when I try to put the above command within a procedure depending on some parameter, and use the Explore parameter to visualize the plots in dependence of the parameter, this does not work anymore. Maple will not produce any plot and will produce a wall of text within the Explore display.

 

For istance, 

with(plots); with(plottools)
display(circle([0, 0], 1)), display(circle([0, 0], 1))


Will produce the pictures side by side as desired. But:

P := proc (a)
display(circle([0, 0], 1)), display(circle([0, a], 1))
end proc:
Explore(P(a), parameters = [a = -1 .. 1])


Will result in a wall of text within the Explore window that begins like this:

 

 

So, is there a way to produce the plots I need which is compatible with the Explore command for a procedure? Ideally I need the two graphs ({A,B} and C) side by side within the same Explore window so that when I vary the parameters, both plots change accordingly. 

Thanks in advance.

Hi. I have an equation that consists lots of sines and cosines but I'm not sure how to differentiate it with respect to time. Whenever I do, I get zero. How do I communicate to Maple that theta changes with time so that it can perform the operation?

Is there any way to transfer the equation to MATLAB and perform it there by any chance? I don't know MATLAB though.

Thanks in advance.

Y = (-2*k^3+6*k^2+sqrt(k^8-12*k^7+64*k^6-198*k^5+448*k^4-636*k^3+369*k^2)-7*k-15)/((k^3-3*k^2+5*k-15)*(1+k))

Hello,

I have created my own costume package inspired from an already existing one but this package relies and uses many functions from the original package which I used to create mine. The question: is there an easy way to automatically import all the needed functions and commands from the original package without having to write the name of the original package followed by the name of each function or command ( which is really laborious and hard to complete) ?

Thank you

Hello, 

 I created my own costum package and I want to edit this package: insert procedures or modules. Is there a way?

Thank you.

Hi, 

I am interested to find the primes in in field Zp which Have prime inverses.  In particular, for any prime p up to an arbitrary number N, the number of pairs (a,b) where a and b are mutually inverse primes <p in Zp. Obviously in this context (a,b) is the same as (b,a) so no need for double counting. What I have so far is the following simple code for finding the inverse of prime q<p, given a chosen value of p. I can then see which results are prime and which are composite.

N:=p:

for n from 1 to N do

X:=q*n-1;

if mod(X,p)=0 then print(n);

end if:

end do:

This “hand cranking” method works but is of course boring but I don’t know how to scale it up to a more efficient code as described above. I would be grateful to anyone  able to assist me with this.

Thanks in advance

David

Hello everyone,
My name's Rafael, I am a master's student in Dentistry in Brazil.
I need your help.
I have several points with X, Y and Z coordinates. I would like to create a curve that represents these points in a 3-dimensional plane.
I'm new using Maple and managed to use the "plots [pointplot3d]" function to represent the points in the chart. However I have a list in excel with several point (over 100) and would like to know how to import these points to use this function.
Thank you very much
 
 
 

 

4 5 6 7 8 9 10 Last Page 6 of 34