Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

I am new to Maple. I have been plotting 3-dimensional graphs, and would like to plot points on the graph, but I don't see how to do that.

Thanks.

Hi all

for a given two parameter in the attached code ( G and PA) to compute the coefficient Cr

I would like to display the text to describe the corresponding situation ( maybe we one add a table )

 

Many tahnks for your help

 

 

 

testprint.mw

plot([v[Iterations-4], v[Iterations-3], v[Iterations-2], v[Iterations-1], v[Iterations-1]], t = 1 .. 2.9, color = [red, green, blue, black, purple]); g11 := plot([v[Iterations-4], v[Iterations-3], v[Iterations-2], v[Iterations-1], v[Iterations-1]], t = 1 .. 2.9, color = [red, green, blue, black, purple], numpoints = 200);

with(plots); p11 := display({g11}, axes = boxed, thickness = 2); dat1 := `~`[plottools:-getdata]([p11]); for i while i <= 5 do A[i] := dat1[i, 3]; Y[i] := A[i][1 .. -1, 2] end do; X := A[1][1 .. -1, 1]; MM1 := `<|>`(X, Y[j2]$j2 = 1 .. 5);

        [[                                                        
        [[                                                        
dat1 := [["curve", [1. .. 2.9, 1.25843241253069330813854745573 .. 
        [[                                                        

                                    [ 200 x 2 Matrix       ]]  
                                    [ Data Type: sfloat    ]]  
  3.64143345197220537035927195897], [ Storage: rectangular ]], 
                                    [ Order: Fortran_order ]]  

  [                                                              
  [                                                              
  ["curve", [1. .. 2.9, 1.26033290400709038909782882918 .. 6.355\
  [                                                              

                               [ 200 x 2 Matrix       ]]  [
                               [ Data Type: sfloat    ]]  [
  77353302842195250192992449], [ Storage: rectangular ]], [
                               [ Order: Fortran_order ]]  [

  "curve", [1. .. 2.9, 1.26039280181499972068892216922 .. 9.3496\

                              [ 200 x 2 Matrix       ]]  [
                              [ Data Type: sfloat    ]]  [
  4246576526181629314962273], [ Storage: rectangular ]], [
                              [ Order: Fortran_order ]]  [

  "curve", [1. .. 2.9, 1.26039397590711135163918382958 .. 10.112\

                              [ 200 x 2 Matrix       ]]  [
                              [ Data Type: sfloat    ]]  [
  7233044121210212769952674], [ Storage: rectangular ]], [
                              [ Order: Fortran_order ]]  [

  "curve", [1. .. 2.9, 1.26039397590711135163918382958 .. 10.112\

                              [ 200 x 2 Matrix       ]]]
                              [ Data Type: sfloat    ]]]
  7233044121210212769952674], [ Storage: rectangular ]]]
                              [ Order: Fortran_order ]]]
Error, 1st Matrix dimension size (1..1) is too small to fit source size (1..200)
Error, number of indices exceeds rank
ExportMatrix("C:/Users/DELL/Dropbox/Common Data (UH)/Hamid made model/For Hamid Thesis/P4 Picard for ODEs/Tecplot//P5 case 1.dat", MM1)
Error, invalid input: ExportMatrix expects its 2nd argument, M, to be of type {Matrix, list(Matrix)}, but received Vector[row](6, {(1) = X, (2) = Y[1], (3) = Y[2], (4) = Y[3], (5) = Y[4], (6) = Y[5]})
 

Hi, in the 'assign' command below, a certain row from matrix 'R' is assigned to the variables RA, MA .. yB. The command works well. However, I wonder if it could not be better/ shorter. So, without having to write out R [1], R [2] .. R [8].

I would be very happy if someone could advise me on this.

Here is the algorithm:

restart:with(linalg):
R:=Matrix(2,8,[1,2,3,4,5,6,7,8,11,12,13,14,15,16,17,18]);


aFshear:=proc(nr,R)
assign(('RA','MA','thetaA','yA','RB','MB','thetaB','yB')
= (R[1],R[2],R[3],R[4],R[5],R[6],R[7],R[8]));
end:


aFshear(2,row(R,2));
print(thetaB);

 

 

I am solving a wave propagation problem and after lots of derivations I ended up with the following differential equations. Any idea how to decouple this system so I can get two decoupled equations of the following forms:

equation (1): = function of (Q)      Equation (2): = function of (w)

System of Equations:

 

I want to evaluate a function of two variables at different values for these variables and collect the outputs in a matrix form. This is my best attempt at figuring it out -- using the string tools to evaluate a matrix at multiple values and spit out data. How can give each output labeled uniquely (not each line labeled A, but A,B,C... for n number of lines)? And How can I take the inner brackets out of the sequence output, to make each row of output data an array? Then I could refer to each data point individually with A[1],A[2],...,B[1],B[2],..., etc.

Please let me know if there is a better way to do this! Thank you, Jeremy

Also here is my code copied in text format for reference:

restart;
Zres:=5;
data:=[];
M:=Matrix(eval~(z*x,z=~[seq(n,n=1..Zres)]));
Array(eval~(z*x,z=~[seq(n,n=1..Zres)]));
with(LinearAlgebra):
for x from 1 to 5 by 0.5 do A:=[((op(data),seq(Column(M,n),n=1..Zres)))] od;

 

I am able to generate random polynomials with non-zero coefficents, and define sets of all the positive divisors of the leading coefficient and the constant terms. My question is this, how may I apply the rational zeros theorem to generate the set of all possible rational zeros of the polynomial. I basically need to form all the possible quotients (positive and negative) with numerator in one set and denominator in the other set, ignoring duplicates. The attached worksheet has what I've done so far.rational_zeros.mw
 

attempt := 1; while attempt > 0 do q := randpoly(x, coeffs = rand(-9 .. 9), degree = 3, dense); if nops(q) = 4 then attempt := -2 end if; attempt := attempt+1 end do; q

5*x^3+3*x^2-4*x-8

(1)

NumberTheory[Divisors](coeff(q, x, 3))

{1, 5}

(2)

NumberTheory[Divisors](coeff(q, x, 0))

{1, 2, 4, 8}

(3)

``


 

Download rational_zeros.mw

 

Hello:
I have a set like following:

               Set:={{1, 2}, {1, 3}, {1, 4}, {2, 3}};
I want to determine number of every member of set?
for example:  1 appears 3 times. 2 appears 2 times,
3 appears 2 times , 4 appears 1 time.

How to do?

 Dear ...

Let us consider $F$ be a parametric polynomial set. How can decide that $F$ contains a constant or parameters, automatically? For example, if $F=/{a*x^3-1, b*y+x, -1, c/}$ where $a, b$ and $c$ are parameters and $x$ and $y$ are variables then the output of procedure is true since of $F$ contains $c$ and also $-1$ and the outputs for $G=\{\a*x^3-1, b*y+x, x+y}$ is false. Is there any command or simple procedure for this conclusion?

I am looking forward to hearing from you

Sincerely yours.

The command eval allows to simplify a complicated expression

in a more compact form for a later output in LATEX

In the example which follows I was able to insert A and B but non C in the expression.

There is already a post on this kind of topic but I failed to understand the details.

Perhaps a Maple worksheet of answer on this topic  would be useful !

bye Lorenzo
 

restart;

expression:=exp(-b*x^c/2)*((x^(-(3*c)/2 + a/2 + 1/2)*(c + a + 1)*b^(-(3*c + a + 1)/(2*c)) + c*x^(a/2 + 1/2 - c/2)*b^(-(c + a + 1)/(2*c)))*c*WhittakerM((-c + a + 1)/(2*c), (2*c + a + 1)/(2*c), b*x^c) + b^(-(3*c + a + 1)/(2*c))*x^(-(3*c)/2 + a/2 + 1/2)*WhittakerM((c + a + 1)/(2*c), (2*c + a + 1)/(2*c), b*x^c)*(c + a + 1)^2)/((a + 1)*(c + a + 1)*(2*c + a + 1));

exp(-(1/2)*b*x^c)*((x^(-(3/2)*c+(1/2)*a+1/2)*(c+a+1)*b^(-(1/2)*(3*c+a+1)/c)+c*x^((1/2)*a+1/2-(1/2)*c)*b^(-(1/2)*(c+a+1)/c))*c*WhittakerM((1/2)*(-c+a+1)/c, (1/2)*(2*c+a+1)/c, b*x^c)+b^(-(1/2)*(3*c+a+1)/c)*x^(-(3/2)*c+(1/2)*a+1/2)*WhittakerM((1/2)*(c+a+1)/c, (1/2)*(2*c+a+1)/c, b*x^c)*(c+a+1)^2)/((a+1)*(c+a+1)*(2*c+a+1))

(1)

``

(2)

expression_ABC:=eval(expression,[x^(-(3*c)/2 + a/2 + 1/2)*(c + a + 1)*b^(-(3*c + a + 1)/(2*c))=A,c*x^(a/2 + 1/2 - c/2)*b^(-(c + a + 1)/(2*c))=B,((a + 1)*(c + a + 1)*(2*c + a + 1))=C]);

exp(-(1/2)*b*x^c)*((A+B)*c*WhittakerM((1/2)*(-c+a+1)/c, (1/2)*(2*c+a+1)/c, b*x^c)+b^(-(1/2)*(3*c+a+1)/c)*x^(-(3/2)*c+(1/2)*a+1/2)*WhittakerM((1/2)*(c+a+1)/c, (1/2)*(2*c+a+1)/c, b*x^c)*(c+a+1)^2)/((a+1)*(c+a+1)*(2*c+a+1))

(3)

 

 

 

 


 

Download maple_primes_eval.mw

 

maple does not work at all

it displays this error

Error, (in StringTools:-FormatMessage) unknown option MAPLE
 

Hare in the forest

The rocket flies

  

Быльнов_raketa_letit.mws

 

Animated 3-D cascade of dolls

 

3d_matryoshkas_en.mws

 

"From the list of positive integers 1; 2; 3; 4; : : :, remove every second number, leaving
1; 3; 5; 7; 9; : : : Since 3 is the flrst surviving number above 2 that has not been used
as the \killer", we remove every 3rd number from the remaining numbers, yielding
1; 3; 7; 9; 13; 15; 19; 21; : : :"

 I have tried using this:

A:= proc(n::integer)::list;
   local B,C,j;
   B:={seq(i,i=1..n)};
   for j from 2 by 2 to n do
       C:= {B minus {B[j]}};
   end do;
 end proc;

But I'm not getting the desired result.

First 661 662 663 664 665 666 667 Last Page 663 of 2218