Items tagged with variables variables Tagged Items Feed

I am using the solve command and the independent variables are in the form x=x. How can I output the solution as a list [set of solutions,independent variables]? The command select(z->symbol=symbol,S), where S is my set of solutions, does not work.

I'm trying to run c code generated from a simple MapleSim example (Spin Up Beam). To makes things even simpler, I set the input real expression to just time, and changed the input function in my c code to:

static void inpfn(double T, double *U)
U[0] = T;

I set all the state variables to 0 for the initial conditions. I ran the code and my output doesn't resemble the MapleSim output at all, and I'm getting errors. So my question is about the state variables, which I initially set to 0:

* State variable(s):
* x[ 0] = `Main.SpinUpBeam.FB3.uf1`(t)
* x[ 1] = diff(`Main.SpinUpBeam.FB3.uf1`(t),t)
* x[ 2] = `Main.SpinUpBeam.FB3.uf2`(t)
* x[ 3] = diff(`Main.SpinUpBeam.FB3.uf2`(t),t)
* x[ 4] = `Main.SpinUpBeam.FB3.vf1`(t)
* x[ 5] = diff(`Main.SpinUpBeam.FB3.vf1`(t),t)
* x[ 6] = `Main.SpinUpBeam.FB3.vf2`(t)
* x[ 7] = diff(`Main.SpinUpBeam.FB3.vf2`(t),t)

What do these represent for this flexible beam (FB3)? I.e. what is uf1, uf2, vf1, vf2? Should they be set to 0, or no?



Im a chemical engineer student with very little knowledge of Maple and its possibilities (which seem endless). I have very little coding experience, even though i do write in LaTeX (which i suppose is referred to as pseudo-code). 

I figured, that as a student, i often run into the same number x problems, that each can be solved in x different ways. Since Maple is so good with units and calculations, aswell as defining variables. I could make some very smart notes, which would allow me to solve different (mostly simple) problems in a very easy and fast manner. 

Now, since i dont know much about Maple, i want to seek som help. 

How do i proceed to make such a document / multiple documents for my purpose? My first idea was to simply create a bunch of different variables defined to a given input, and then simply change the variables as i get a new problem. But i figured that there must be smarter and more neet ways to make this. 

Let me know what you think. 


Sincerely, Mikkel.

Hi everyone,

I wanted to know if it was possible to store symbolic variables in a vector because I have a function of 10 variables which I want to write with Σ, Π and A(l), A being my vector of symbolic variables...

Thank you for your time



source1 := PolynomialRing([a,b,c]);
target1 := PolynomialRing([e1,e2,e3,e4]);
source1list := [eq2a, eq3a,eq4a];
target1list := [eq2b, eq3b, eq4b,eq5b];
cs := PolynomialMapPreimage(target1list, source1list, source1, target1);

Error, (in RegularChains:-ConstructibleSetTools:-PolynomialMapPreimage) number of map functions is different from number of variables in target space


in maple 15 do not have error, however now it has error for the code below

with(RegularChains): with(RegularChains): with(ConstructibleSetTools): 

source1 := PolynomialRing([e1, e2, e3]);
target1 := PolynomialRing([a, b, c]);
source1list := [-1*e1+2*e2+*e3, -1*e1+2*e2+*e3, -1*e1+2*e2+*e3];
target1list := [.....]; cs :=
PolynomialMapPreimage(target1list, source1list, source1, target1);

Error, invalid product/quotient



Hi, i got a litlle problem with fromats, i m realy bad at this.
i got procedure 'getone(z::list)' i was execute it like this  
>getone([seq(lineP[i], i = 1 .. pm)]::list)
where lineP is 

>pm := 3;
>rollx := rand(98.0 .. 102.0); rolly := rand(-1.0 .. 5);
>rolll := rand(.5 .. 1.0); rollf := rand(0. .. evalf(2*Pi));
>rollm := rand(0. .. 20.0);

>for i to pm do lineP[i] := [rollx(), rolly(), rolll(), rollf(), rollm()] end do;

it's pm times of z:=[rollx(), rolly(), rolll(), rollf(), rollm()] ::list

and i need make optimization work for any pm=1..100; with rabdomly generated iteration point as above.

The main queston is how make minimize as below
Minimize(z,variables=[z],   initialpoint={z=[seq(lineP[i], i = 1 .. pm)]},iterationlimit=1000,optimalitytolerance=0.01)

work with z::list kind of 

[[100.7798614, 1.109653266, 0.9840371500, 4.257816686, 9.737110573][100.0135459, 0.887539481, 0.9144164697, 3.980093624, 7.343851161][100.0661308, 3.724268229, 0.5020544909, 2.052134822, 14.37408543]]

Hi everyone.

I have been experiencing a problem trying to solve a coupled system of 3 differencial equations

My problem is that a got a message back as I try to solve the system:

"Error, (in pdsolve/numeric/process_IBCs) improper op or subscript selector"

by apply this point that ''all dependent variables must be functions of the same independent variables''

i again accost with another error ''

Error, (in pdsolve/numeric/process_IBCs) initial/boundary conditions can only contain derivatives which are normal to the boundary, got (D[1, 1](w))(x, -3/400000000)


please help me.....very very thanks

In Maple TA in blackboard I am creating an assignment. Each week a part of the assignment will be posted. I was wondering if it is possible to have the same random variables in differnet assignmemts. That way the students can use their prior work. 

So in week one the students will get a set of random variables. But in week two a new assignment is posted were I want the same variables to come up for each student. Is this possible? (all students will have their own unique set of variables)

Given a polynomial in several variables is it possible to split it so that all the coefficients of the monomials are +1 or -1.



I would lie to obtain

f:=-z +x+x +y+y+y+y -x*y-x*y-x*y.

Hi, I have 10 equation system and 10 unknown variables. I however, want to reduce the equations to 2 with two unknowns. I'm wondering how this could be done in maple. The variables are Y, q, yd, y*, yx, H,  pd, w, P and Pv. I intend to solve the equations for Y and w. 

Thanks in advance for your help. The maple file has also been attached.




Let I  be a polynomial in K[A][X] s.t. A is a sequence of parameters (coefficients of f in F) and X is a sequence of variables. I want to extract the variables from ideal I.

For example if I=[(a-1)x*y^2-b+x, x-y+x^2-c] s.t. a,b,c are parameters and x,y are variables. I want {x,y} as the output of algorithm.

1. how to eliminate the diff(*(x,y,z),x) terms in an expression, "*" means any function which have independent variables x,y,z?

2. how to get the gradient of a vector, which should be a tensor?

 Let M be a matrix with polynomial array f_i's such that any array is in K[a_1,..,a_m][x_1,..,x_n] where a=a_1,,,a_m are sequence of parameters and x=x_1,..,x_n are sequense of variables. Now, I want to extract the coefficients of  f_i that are in K[a_1,a_2,..,a_m]. For example if M=Matrix([[ax-bxy],[cx^2-dy]]) how can I extract the matrix coefficint C=Matrix([[a,-b],[c,-d]])?

Please note that a,b,c,d are parameters and x,y are variables.


My problem is the following; Let's say that I want to make a simple program of designing of a steel beam. In order to do so, there is a respectable number of parameters that have to be taken into account - forces, geometrical characteristics etc -. So for example, I have an excel file that has the following rows

1) A row of variables  :                          LENGTH   MOMENT_OF_INERTIA   AXIAL_FORCE    HEIGHT_OF_SECTION
2)A row of a value for each one variable :      5                556                       130                       300

the traditional approach in maple to intoduce these values to the program would be:

AXIAL_FORCE:=130                etc etc

and then when for example we write



..but for problems like this the variables may be 50 in number, even more.. and it would be very timeconsuming to define all these parameters one by one..
so what I have been looking for so much these days is a predefined maple procedure - if there is one.. - that takes a matrix which we have created in advance and that includes all the names of the variables that we want to have in the problem - let's name it VARIABLES - takes as well a matrix that we also have created in advance and includes the value that we want each of our variables to get in the problem - let's name it VALUES - and make the correspondense automatically, so as to when we introduce an epression in maple thereafter, like     MOMENT_OF_INERTIA/LENGTH, when we press enter to get  556/5=111.2  (and not just a reproducing of what we already wrote , MOMENT_OF_INERTIA/LENGTH ..).. Do you think that there is an easy way to do so??

many thanks in advance!

Hello maple users,

I want to compare 5 functions and see which one gives the best result (highest score). Unfortunatelly, I can't say one function always gives higher results than others. I have 8 variables and it makes the comparison complicated.

I assume 4 of them are constant and the other 4 or not.





for Pb= 0:0.025:0.20                   Pb and Pa are probabilities, between 0-20, 0.025 increments
    for Pa= 0:0.025:(Pb-0.025)      ** Pa is always less than Pb
        for Ha= 0:50                      Ha takes values between 0-50
            for Hb= 0:(Ha-1)            ** Hb is always less than Ha

I attached the data file. I appreciate if someone tells me how to compare these functions. Should I put more assumptions to make it easier? Thank you.

1 2 3 4 Page 1 of 4