MaplePrimes Questions

restart;In this code "add" is a trouble.
A := Matrix([[1, 2, 1, 3], [1, 1, 2, 1], [1, -2, 5, -11]]);
cs := LinearAlgebra:-ColumnSpace(A);
cnames := [seq(c || j, j = 1 .. numelems(cs))];
cvals := seq(solve([entries(A[() .. (), k] -~ add(`*`~(cnames, cs)), 'nolist')], cnames)[], k = 1 .. op([1, 2], A));
seq(add*rhs~(cvals[k]) *~ cs, k = 1 .. op([1, 2], A));
add does not play its role. Why. Thank you.

Is there an easy command to generate the edge sets of of all connected graphs for a given number of vertices? Ideally, I'd like to output to be of the form (e.g.)

G={{1,2},{2,3},{1,3},{1,4}};

text text text text;

text1 text1;

so that I can easily copy it into another program to be read. Or, is there a way that I can produce an output like the following (e.g. for n=3)

G={{1,2},{2,3}};

text text text text;

text1 text1;

G={{1,2},{2,3},{1,3}};

text text text text;

text1 text1;

and have it export to a text file?

The timelimit command of Maple can be used to do a computation if it uses less than a given amount of time, otherwise generating an error message that can be cought by try ... catch. Now my question is that there exists any similar command, but with a limitation on memory usage, not the time usage. I don't mean what datalimit in kernelopts can does, because I am not going to limit the memory usage of the whole Maple session, but just a command which may be used inside a larger procedure etc.

Hello.

I wrote some codes for solving equations in a special way. My codes work very fine when my differential system has only one equation.

But when I extend it to a system that has two or more equations, sometimes does not work and I face with error. However, in one system (2 eq) it also works. But it is only a special case. If you want, I can upload it here as well.

I am attaching the maple file containing the error. You can observe it. 

By examining many cases, I think that maybe the root of the problem is that I must change my codes in a way that they are for a "system". Indeed, instead of writing codes for each differential equation, I must define a system and write these codes for a system containing some differential equations.
However, I think that the boundary conditions sometimes also may be the root of the error.

I change the attached codes for this purpose, but I failed. I prefer to not present my wrong codes for this purpose. 

If it is possible, help me to change my codes.

Thanks a lot.

ERROR.mw

Solve equation :x4-x3-3x2-x+12=0

I am running Maple 2021 and have this plot in Differential Equation. However, It will not display the Graph.

The  general solution : y = 1.42
                  "exp(-0.125*t)*sin(1.41*t)"

NULL;
soln := y(t) = 1.42*exp(-0.125*t)*sin(1.41*t);
         soln := y(t) = 1.42 exp(-0.125 t) sin(1.41 t)

(b) Plot y vs. t  and y' vs. t on the same axes.
Let y and dy be the right side and derivative , respectively, of soln. Graph y and dy together

So i have defined some variables example:

xb=1000
yb=2500

db=5321
eb=521
and i want to solve the following symbolically without maple taking into account the variables:
eb=ab*yb*db*x

How do I force Maple to show the equation for the expression symbolically without unassigning the variables? I was thinking about local variables, but that would make the worksheet messy as the variables are used in other calculations.

Thank you.

Hi all,

how to use semilogplot here

plots[odeplot](res1, [[t, N(t)]], 0.1e-2 .. 1000, axes = boxed, tickmarks = [3, 2], color = red, thickness = 1, linestyle = solid, titlefont = [Helvetica, roman, 18], labeldirections = [horizontal, vertical], labelfont = [Helvetica, roman, 24])

I try to find kernel and image of a application whose i know the matrix.
restart;
with(LinearAlgebra);
A := Matrix([[1, 1, 1, -1], [-1, 1, -1, -1], [1, -1, -1, -1], [-1, -1, 1, 3]]);
k := op(NullSpace(A));#kernel
MatrixVectorMultiply(A, k);#check
C := op(ColumnSpace(A));
X := <x, y, z, t>;
F := MatrixVectorMultiply(A, X) - a*C[1] - b*C[2] - c*C[2];
G := op(convert(F, list));
solve({seq(G[i] = 0, i = 1 .. 4)}, {a, b, c}); why there is no solution ? Thank you.

How to fprintf say a plot into a docx file in maplesoft

kind help

I'm solving a set of non-linear equations:

 

eqn1 := W__1 + W__2 + W__3 + W__4 = 4;
             eqn1 := W__1 + W__2 + W__3 + W__4 = 4

eqn2 := W__1*zeta__1 + W__2*zeta__2 + W__3*zeta__3 + W__4*zeta__4 = 0;
eqn2 := W__1 zeta__1 + W__2 zeta__2 + W__3 zeta__3 + W__4 zeta__4 = 

  0


eqn3 := W__1*zeta__1^2 + W__2*zeta__2^2 + W__3*zeta__3^2 + W__4*zeta__4^2 = 2/3;
                         2               2               2
     eqn3 := W__1 zeta__1  + W__2 zeta__2  + W__3 zeta__3 

                      2   2
        + W__4 zeta__4  = -
                          3


eqn4 := W__1*zeta__1^3 + W__2*zeta__2^3 + W__3*zeta__3^3 + W__4*zeta__4^3 = 0;
                         3               3               3
     eqn4 := W__1 zeta__1  + W__2 zeta__2  + W__3 zeta__3 

                      3    
        + W__4 zeta__4  = 0


eqn5 := W__1*zeta__1^4 + W__2*zeta__2^4 + W__3*zeta__3^4 + W__4*zeta__4^4 = 2/5;
                         4               4               4
     eqn5 := W__1 zeta__1  + W__2 zeta__2  + W__3 zeta__3 

                      4   2
        + W__4 zeta__4  = -
                          5


eqn6 := W__1*zeta__1^5 + W__2*zeta__2^5 + W__3*zeta__3^5 + W__4*zeta__4^5 = 0;
                         5               5               5
     eqn6 := W__1 zeta__1  + W__2 zeta__2  + W__3 zeta__3 

                      5    
        + W__4 zeta__4  = 0


eqn7 := W__1*zeta__1^6 + W__2*zeta__2^6 + W__3*zeta__3^6 + W__4*zeta__4^6 = 2/7;
                         6               6               6
     eqn7 := W__1 zeta__1  + W__2 zeta__2  + W__3 zeta__3 

                      6   2
        + W__4 zeta__4  = -
                          7


eqn8 := W__1*zeta__1^7 + W__2*zeta__2^7 + W__3*zeta__3^7 + W__4*zeta__4^7 = 0;
                         7               7               7
     eqn8 := W__1 zeta__1  + W__2 zeta__2  + W__3 zeta__3 

                      7    
        + W__4 zeta__4  = 0


solve({eqn1, eqn2, eqn3, eqn4, eqn5, eqn6, eqn7}, {W__1, W__2, W__3, W__4, zeta__1, zeta__2, zeta__3, zeta__4});

However, the result looks like this:

 

How should I obtain numerical values for W1,W2,W3,W4,zeta1,zeta2,zeta3,zeta4 ?

I have an array with a list of parameters. Suppose there are three parameters, t1, t2 and t3. I like to evaulate the array for different values of the parameters. I can do it manually by a command such as

eval(array, {t1=1, t2=5, t3=10})

What is a more systematic approach and how can it be done? Suppose I do not know the number of paramters in advance and the number of parameters could possible be large. Once I know the number of parameters, I would like to map a list of values to the parameters.

Thanks in advance!

Is there any equivalent to Excel function arctan2?

This function takes x and y values, and returns values from -Pi to +Pi. In that way one can easily get the x and y values of an angle with correct signs.

Hello,

I have a problem regarding the physics package, which concerns, more specifically, the Define command.

It seems to be the case that it provides the wrong answer, and blatantly so, and I can't see what I am doing wrong for the life of me.

I want to build a fast way of doing coordinate transformations in general relativity, for which the basis vectors are called E[mu,~nu]. XX[~alpha] is the old coordinates expressed in terms of the new (in this case, the spherical coordinates are expressed in terms of cylindrical ones, i.e. [t,r, theta, phi]->[t, rho, phi,z].) As can be seen, only the first component in XX depends on time, but E contains weird elements (look at, for example, E[1,~2].) But when I do the calculation manually, it returns the expected results.

What am I doing wrong? I really appreciate any help you can provide.

Benzema

Are there any examples showing how to plot multiple items in one plot?

  • What I have started with is to put a Plot component in my sheet, so that I can use that by its name.
  • Next thing on the list was to generate different plot objects, by assigning each of them to a variable.
  • To plot the whole bunch, I collected all the items I want to plot in a list
  • And plotted them by SetProperty("MyPlotcomponent", value, display(plotlist))

I wonder if this is the best way to do it. Especially when adding more stuff afterwards, would it be possible to just add something to the plot component?

Do I need plot components at all?

First 367 368 369 370 371 372 373 Last Page 369 of 2427