MaplePrimes Questions

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 wrote a procedure. It includes two matrices which are H and psi. I highlighted the matrices in the following code.
I saved the file by using the following code. 

save newprocedure, "file.m";

 

In the other worksheet, I want to call and use these two matrices. 

How can I do?


You can find the following code for details.

procedure.mw

In the other worksheet; I can call one of these matrices, but I can' t call both of them.

restart;
read "C:\\Users\\PC\\Desktop\\file.m";
newprocedure(2);


 

can maple do a real time update graph by for loop read file data?

i can only think that use for loop and read file and draw a sequence of graph,

but memory will be accumulated to consume

just want to make a dashboard to display a multiple of graphs

How do I save these fonts as my default ones?                                

"Maple Input: Arial 24, Red"

and "2D Output: Arial 18, Blue".

I am using Maple 13.

Thank you!

 

would like to point to graph then it highlight graph with virtical line

and mark 1 in one of row in one of column in table like data 

just like define feature manually for machine learning but using graph

By default Maple labels vertices 1, 2, ...  and places these numbers within a circle making the position of the vertex.  Can one change the labels to, say, v1, v2, ... and place these outside the circles?  ..................Edgar

Write a program in Maple that solves the recurrence equations given for K[n] and R[n] numerically. Assume that if the recurrence equations return less than half a rabbit or fox, K[n] ≤ 0.5, respectively R[n] ≤ 0.5, at a time n, this means that the rabbits or foxes go extinct. Check that your program reproduces the equilibrium-solution if you start with the initial values K0 = Ke and R0 = Re.

 

 

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.

After doing some calculations, the result includes 20 rows,  3 columns.

but it doesn't appear. How can we see the result?

Please find the following code?

problem.mw

 

Thanks.

Please describe the step-by-step application of the rules of differentiation which produce this derivative:

diff(a(x)^b(x), x) =        

a(x)^b(x)*((diff(b(x), x))*ln(a(x))+b(x)*(diff(a(x), x))/a(x));

why pdsolve does not work?

Q and alpha are constant. I want to find f(x,y).

Thanks
 

"restart: w(x,y) :=Q*sin^(2)(Pi*x)*sin^(2)(Pi*y)"

proc (x, y) options operator, arrow, function_assign; Q*sin(Pi*x)^2*sin(Pi*y)^2 end proc

(1)

PDE := diff(f(x, y), x, x, x, x)+2*(diff(f(x, y), x, x, y, y))/alpha^2+(diff(f(x, y), y, y, y, y))/alpha^4+((diff(w(x, y), y, y))*(diff(w(x, y), x, x))-(diff(w(x, y), x, y))^2)/alpha^2

diff(diff(diff(diff(f(x, y), x), x), x), x)+2*(diff(diff(diff(diff(f(x, y), x), x), y), y))/alpha^2+(diff(diff(diff(diff(f(x, y), y), y), y), y))/alpha^4+((2*Q*sin(Pi*x)^2*Pi^2*cos(Pi*y)^2-2*Q*sin(Pi*x)^2*sin(Pi*y)^2*Pi^2)*(2*Q*Pi^2*cos(Pi*x)^2*sin(Pi*y)^2-2*Q*sin(Pi*x)^2*sin(Pi*y)^2*Pi^2)-16*Q^2*sin(Pi*x)^2*sin(Pi*y)^2*Pi^4*cos(Pi*x)^2*cos(Pi*y)^2)/alpha^2

(2)

pdsolve(PDE)

``


 

Download PLATE.mw

I currently have a list 2 elements long filled with lists 6 elements long similar to the following:

A := [[0, 1, 2, 3, 4, 5], list[0, 2, 4, 6, 8, 10]]

I would like to output 'A' (my list of lists) to a text file to look like the following:

0   0

1   2

2   4

3   6

4   8

5   10

 

Currently my code looks like this

L := [ ];
M := [ ];
for i from 0 to 5 do L := [op(L), 2*i]; M := [op(M), i] end do;
A := [M, L];
writedata(test, A, float);

 

Which provides me with almost what I need, but written horizontally instead of vertically:

0    1    2    3    4    5
0    2    4    6    8    10

 

How do I alter the code so that I can read my values vertically?

How do I solve for nonlinear differential equation with boundary value problem? Is it possible to solve nonlinear ODE by using Laplace Transform with Maple? If possible, can give me an example of solving nonlinear ODE using Maple. Thank you.

0.733333e^-1

0.733333e^-3

0.733333e^-5

0.733333e^-7

 

no matter what e is , expect to output the same 0.733333

 

I am trying to plot y:=x^2+x-12 as a curve and as a series of point. It is just not working. Suggestions, please.

Digitalize.mw
 

restart

f := proc (x) options operator, arrow; x^2+x-12 end proc

n := 10

h := 5``

printf("\n    i        x       f (dec.form)    f (sci. notat.)\n"); printf("  ---------------------------------------------------\n"); for i from 0 to n do X[i] := i*h; Y[i] := f(X[i]); printf(" %5d  %9.4f  %13.9f  %17.10e\n", i, X[i], Y[i], Y[i]) end do


    i        x       f (dec.form)    f (sci. notat.)
  ---------------------------------------------------
     0     0.0000  -12.000000000  -1.2000000000e+01
     1     5.0000   18.000000000   1.8000000000e+01
     2    10.0000   98.000000000   9.8000000000e+01
     3    15.0000  228.000000000   2.2800000000e+02
     4    20.0000  408.000000000   4.0800000000e+02
     5    25.0000  638.000000000   6.3800000000e+02
     6    30.0000  918.000000000   9.1800000000e+02
     7    35.0000  1248.000000000   1.2480000000e+03
     8    40.0000  1628.000000000   1.6280000000e+03
     9    45.0000  2058.000000000   2.0580000000e+03
    10    50.0000  2538.000000000   2.5380000000e+03

 

``

plot1 := plot([X[k], Y[k]], k = 0 .. n, style = point, symbol = soliddiamond, symbolsize = 24, color = blue)

plot2 := plot(f(x), x = 0 .. 50)

with(plots)

display([plot1, plot2])

 

``


 

Download Digitalize.mw

 

First 769 770 771 772 773 774 775 Last Page 771 of 2433