Maple 2017 Questions and Posts

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


 

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

In ScientificConstants, the density of carbon is given as 2.2 g/cm^3. That happens to be the value for graphite. Carbon comes in different states with different density, diamond being one of them, amorphous being another. Is this somewhere in ScientificConstants where just I cannot find it, or is it not there?

TIA,

M.D.

PS: I do know the values and where to find them (Particle Data Group). I'd like to use ScientificConstants so I can write a more general piece of code.

The curve is defined by

I am trying to add a specific property (radiation length) to the Elements in ScientificConstants.

To do this  I first 

ScientificConstants:-AddProperty(radiationlength); # this seems to work

I then load a table of element name - radiationLength pairs (it is really a bigger table but only these are of interest):

data:=ImportMatrix(cat(libname[1],"/RadiationLengthTable.txt"),source=delimited,\
                       datatype=anything,delimiter="\t"); # works too

(I made the file using downloaded data).

I then want to fill the radiationlength properties for all elements for which I've got the value:

for i from 1 to LinearAlgebra:-RowDimension(data) do
  elemt:=data[i,1]; # the element name as a string
  ScientificConstants:-ModifyElement(cat(elemt),radiationlength=[value=data[i,4],units=g/cm^2]);
end do;

which fails with the error

Error, (in ScientificConstants:-ModifyElement) element ``H `` is not known

H is the first element in the table of radiation lengths so it is getting the right one.

At  issue is that somehow the element name (called descriptor in the Help files) does not seem to get properly evaluated. In fact I tried various ways "by hand", none except just the unevaluated element name (i.e H,He etc. worked).

There must be a way to set these in a loop. Does someone know how?

TIA,

Mac Dude

 

 

I am writing a small code to find median and mean. The code works for an even number of terms, not for an odd number of terms. I tried to find the error but cannot.

restart:medianmean:= proc(x) local a,b,c,d,m,g;
a:=sort(x); b:=nops(x); c:=nops(x)/2; d:=(nops(x)+1)/2;
m:=(a[c]+a[c+1])/2; g:=add(a)/b;
if (b mod 2 = 0) then evalf([a,m,g]) ;
else evalf([a,a[d],g]);
end if; end proc:

 

First 10 11 12 13 14 15 16 Last Page 12 of 40