# Items tagged with parametersparameters Tagged Items Feed

### Non linear system...

November 24 2014
0 2

Dear all;

I need your help to get all the solution of this nonlinear  system  with four parameters: r1, r2, q1, q2  assumed to be positives. Let the system:

the first equation is: r1*x*(1-x/q1)=x*y/(1+x)

the second equation: r2*y*(exp(-y)-q2)=-x*y/(1+x)

How can get the positive solution ( x, y) of the previous system.

### Reading parameters from file using sed...

November 04 2014
0 4

Hej everyone,

I am trying to run a Maple script for multiple parameters on our cluster, so far so good. I found that I can pass for example a:=1 and b:=2 to a Maple script using

maple -c "a:=1;" -c "b:=2;" < script.mpl

Is that the best/only way? For convenience I would like to read the parameters from a file, my first idea was to work with sed, so I tried

maple \$(sed -n 1'p' data) < script.mpl

This should take the first line from data (which is -c "a:=1;" -c "b:=2;"), so that I would expect to get the same result.
Unfortunately, this is not the case, only the first parameter a:=1 is passed correctly and non of the further parameters.

I've appended the files, I used.

This may be not a Maple problem but rather me making a mistake using sed, but maybe you can see where I made a mistake.

Sören

 >
 >
 >

The mw-file has to be exported as an mpl-file first. In my case data just contains one line: -c "a:=1;" -c "b:=2;" -c "c:=3;" (I couldn't upload either)

### Solution for a given set of parameters...

November 02 2014
1 4

Is it possible in Maple 15 to solve an equation with a parameter for a given set of parameters? How can this be passed to the solve function, should I use some kind of list?  After obtaining the solution how can I assign the solutions to variables such as x1 for the first value of the parameter, x2 for the second value of the parameters and so on. Furthermore, is this possible with the fsolve command?

Thanks

### Trigonometric calculation with parameters in Maple...

October 21 2014
1 0

Hi,

I need to build a multibody model in MapleSim 6.4 in which with few global parameters I can describe all the other parameters. In other words the final user will enter this few parameters, that are coordinates of specific points, and then the model will calculate all the relative distances on the base of those coordinates.

The problem is that if I apply trigonometric function and square root (like in the screenshot) the model is not calculating any value. Is it possible to make those calculculations?

this is the model (don't worry about the nonsense plots, it's because it's not ultimated):

DWS.msim

Thanks.

### Syntax error with symbolic parameters...

October 06 2014
2 9

Hi everyone,

I have to create a double wishbone suspesione model that can be edited by different users, only introducing some reference point values (called Hard Points). So I need some tool that, in some way, passes from the entered reference point values to the actual values of the bodyframes link.

I found an already done model (from this link) that seems to be perfect to me because contains an attached Maple document that does exactly what I need working on the base of symbolic parameters applied to the MapleSim model. Now my problem is that I need to deeply change the model and so having the possibility to change the parameter set and insert for example nex parameters. But when I try to do that some problems come out with the Maple document: the syntax of the nex parameter set is different from the default (in the sense of already built in the model I downloaded) one and there are some syntax errors. Below I'll put a screenshot of the error.

under the XData code line, you can also see the syntax of one of the parameters that is very long and complicated: below I'll insert another image from which it can be seen the syntax with the original parameter set.

Now if you another idea for solving the initial problem, that would be great! Instead do you have an idea on how to fix the problem with the downloaded model? In my opinion there is a different MapleSim version problem, in the sense that could be thatn the model I downloaded has been done in another MapleSim version in which the parameter set syntax was different.

### Parameters not evaluated and 3D visualization...

August 19 2014
0 0

Hello,

In my model, it seems that I have parameters which are not evaluated.

Indeed, I'm not sure that the parameters defined with relations as you can see in the printscreen are evaluated.

One point which helps me to debug my model is to follow the evaluation of the construction of my model with the 3D visualization.

Questions :
1) How can I do to be sure that my parameters are evaluated ?

2) Is it possible to launch the update of the 3D visualization even if I still have some bugs in my model ?

Thank you for help.

### Visualization update of parameters...

August 19 2014
0 6

Hello,

In a subsystem, i defined parameters like this in the "parameters" area :

In the "diagram" area, the parameters are not updated because i see this panel :

Do you know why the parameters are not updated (possibly only on visualization) ? And if yes, how i can do to visualize in this last panel the value of the parameters updated ?

Thanks a lot for your help

### Custom Components : Parameters to variables...

August 19 2014
1 2

Hi,

I want to calculate a new position (X,Y,Z) for a cartesian model with 3 points (dX,dY,dZ) but  I got a problem, my point is a parameters, so I can't change it in the simulation in real time with a Input signal on the components. Does It exist a solution for convert a parameters to a variable to get a Input signal?

Exemple of my calcul:

eq:= [x(t)= dx+sin(dy/dz), y(t)=dy+20,z(t)=dz]

Thanks!

### Possibility of making calculations with the parame...

August 18 2014
0 3

Hello,

In my model, in order to better follow a analytical study, i would like to make some calculations with my paramters.

For example, I have defined :

xa=1

ya=2

R=sqrt(xa²+ya²)

I would define R in the parameters area so as to use it for some definitions in the definition of body (i use especially maplesim for multibody systems.)

How is it possible to define parameters thanks to relations ?

### Warning, cannot evaluate the solution further righ...

July 09 2014
0 1

Pleaz i nees help i have probleme withe singularity

 >

Paramétres

 >
 (1.1)

Equation suivant x :

 >
 (2.1)

Equation suivant z :

 >
 (3.1)

Equation suivant y :

 >
 (4.1)

Equation suivant y

 >
 (5.1)

Résolution :

 > CI:= x(0)=0,z(0)=0,theta(0)=0,alpha(0)=0,D(x)(0)=0,D(alpha)(0)=0,D(z)(0)=0,D(theta)(0)=0;
 (6.1)
 > if theta(t) <> 0 then  solution:=dsolve([eq1,eq2,eq3,eq4,CI],numeric,maxfun=0):  odeplot(solution, [[t, x(t)]], t = 0 .. 100, thickness = 2);  odeplot(solution, [[t, z(t)]], t = 0 .. 100, thickness = 2);  odeplot(solution, [[t, theta(t)]], t = 0 .. 100, thickness = 2);  odeplot(solution, [[t, alpha(t)]], t = 0 .. 100, thickness = 2);  #odeplot(solution,[[t,x(t)],[t,alpha(t)],[t,z(t)],[t,theta(t)]], t=0..100, thickness=2);  end ;

thank you !

### System of parametric equations...

June 13 2014
1 7

Hello,

I'm quite new to Maple and I have a serious problem when I'm trying to solve this system of equations for (a,b,p,v,u,g):

1) alpha[1]= v a u (1- b)
2) alpha[2]= v a ub
3) alpha[3]= v (1-a)=v-va
4) alpha[11]= 1/(2) auv (-1+b) (-b u p+b a u p+b g+p u-u p a)
5) alpha[22]= 1/(2) a u v b (-b u p+b a u p+b g-g)
6) alpha[33]= 1/(2)(a- 1)apv
7) alpha[12]= -a u v b(pu-pua-g - bup +baup +bg)
8) alpha[13]= (a-1) (b-1)ap vu
9) alpha[23]= (1-a) a p v ub

I tried this command:

solve({v*(1-a) = alpha[3], a*u*v*b = alpha[2], v*a*u*(1-b) = alpha[1], (1/2*(-1+a))*a*p*v = alpha[33], (-1+a)*(-1+b)*a*p*v*u = alpha[13], (1-a)*a*p*v*u*b = alpha[23], (1/2)*a*u*v*b*(-b*u*p+b*a*u*p+b*g-g) = alpha[22], -a*u*v*b*(p*u-u*p*a-g-b*u*p+b*a*u*p+b*g) = alpha[12], (1/2)*a*u*v*(-1+b)*(-b*u*p+b*a*u*p+b*g+p*u-u*p*a) = alpha[11]}, {a, b, g, p, u, v}, 'parametric' = 'full', 'parameters' = {alpha[1], alpha[2], alpha[3], alpha[11], alpha[12], alpha[13], alpha[22], alpha[23], alpha[33]})

but the Maple output is [ ]. I can find a solution manually but I don't understand why I cannot do it with Maple. It's very important that I find a solution as I have a much more complicated system to solve in a similar manner.

Thank you very much for your help!!

Elena

### Error, (in ysol) cannot evaluate the solution furt...

June 09 2014
0 3

Hello everybody, I need help please

 > restart:with(plots):
 > mb:=765; mp:=587;Ib:=76.3*10^3;Ip:=7.3*10^3; l:=0.92; d:=10; F:=-1.2; omega:=0.43;g:=9.81;ly:=3;k:=0.02001014429;
 (1)
 > A:=168913.8672;
 (2)
 > s:=0.0666666666667;
 (3)
 > n:=49.97465213;
 (4)
 > eq1:=(mp+mb)*diff(x(t),t\$2)+mp*(d*cos(theta(t))+l*cos(alpha(t)+theta(t)))*diff(theta(t),t\$2)+mp*l*cos(alpha(t)+theta(t))*diff(alpha(t),t\$2)+mp*(d*diff(theta(t),t)^2*sin(theta(t))+l*(diff(theta(t),t)+diff(alpha(t),t))^2*sin(alpha(t)+theta(t)))+A*2*(s*sinh(k*ly+k*ly)*sin(omega*t-k*x(t)))=0;
 (5)
 > eq2:=(mp+mb)*diff(z(t),t\$2)-mp*d*(sin(theta(t)+alpha(t))+sin(theta(t)))*diff(theta(t),t\$2)-mp*l*sin(alpha(t)+theta(t))*diff(alpha(t),t\$2)+mp*(d*diff(theta(t),t)^2*cos(theta(t))+l*(diff(theta(t),t)+diff(alpha(t),t))^2*cos(alpha(t)+theta(t)))+9.81*(mp+mb)+1000*g*z(t)*15.3*30+A*cosh(k*ly+k*z(t))*n*(cos(omega*t-k*15)-cos(omega*t+k*15))=0;
 (6)
 > eq3:=mp*(d*cos(theta(t))+l*cos(alpha(t)+theta(t)))*diff(x(t),t\$2)-mp*(l*sin(theta(t)+alpha(t))+d*sin(theta(t)))*diff(z(t),t\$2)+(Ip+Ib+mp*(d^2+l^2)+2*mp*d*l*cos(alpha(t)))*diff(theta(t),t\$2)+(Ip+mp*l^2+mp*d*l*cos(alpha(t)))*diff(alpha(t),t\$2)-mp*sin(alpha(t))*(l*d*diff(alpha(t),t)^2-l*d*(diff(alpha(t),t)+diff(theta(t),t))^2)+mp*9.81*l*sin(alpha(t)+theta(t))+mp*9.81*d*sin(theta(t))=0;
 (7)
 > eq4:=mp*l*cos(alpha(t)+theta(t))*diff(x(t),t\$2)-mp*l*sin(alpha(t)+theta(t))*diff(z(t),t\$2)+(Ip+mp*l^2+mp*d*l*cos(alpha(t)))*diff(theta(t),t\$2)+(Ip+mp*l^2)*diff(alpha(t),t\$2)-mp*9.81*l*sin(alpha(t)+theta(t))+l*d*mp*diff(theta(t),t\$1)^2*sin(alpha(t))=0;
 (8)
 > CI:= x(0)=0,z(0)=0,theta(0)=0,alpha(0)=0,D(x)(0)=0,D(alpha)(0)=0,D(z)(0)=0,D(theta)(0)=0;
 (9)
 > solution:=dsolve([eq1,eq2,eq3,eq4,CI],numeric,maxfun=100000);
 (10)

 > odeplot(solution,[[t,x(t)],[t,alpha(t)],[t,z(t)],[t,theta(t)]], t=0..1000, thickness=2);
 > odeplot(solution,[[t,x(t)]], t=0..1000, thickness=2);
 > odeplot(solution,[[t,z(t)]], t=0..1000, thickness=2);
 > odeplot(solution,[[t,alpha(t)]], t=0..1000, thickness=2);
 > odeplot(solution,[[t,theta(t)]], t=0..1000, thickness=2);

thank you

### How can I precalculate appropriate initial conditi...

May 01 2014
2 0

I have a complex set of mechanical linkages and components, and I am trying to create a feedback control system for trajectory-tracking with the end-effector. They system is driven by a set of prismatic joints (representing ideal series-elastic actuators). At this stage I am simply trying to establish the control parameters and the required forces to achieve desired positions/velocities in the workspace, and have not yet inserted any realistic actuator characteristics.

An open-loop solution can be found using translational position control on the prismatic joints, this is no problem. However to close the loop properly, I need to convert the system to use a differential input, such as a velocity driver. At this point everything becomes very finicky and highly dependent on initial conditions. Generally Maplesim gives up, claiming that no solution can be found. Due to the complexity of the system, there is no way for me to guess a priori the appropriate initial conditions of all the joints and linkages. I was wondering if anybody had any tips for either pre-determining the initial parameters, or alternatively for relaxing the solver in some way to allow for a wider exploration of possible solutions. Or any other ideas!

So far: I have tried setting up an open loop position-driven system with the same trajectories and using Maple to read all the initial conditions, then transferring them as guesses to my closed-loop system. But this has not worked. As a temporary workaround I am using position drivers on the SEAs, which are in turn driven by a velocity controller (with an integrator term). However this is suboptimal. Any help would be much appreciated!

### Display-Error--Fix-Error...

April 26 2014
0 0

Hi,

I solve laplace equation in a square. All the lines of my code is okay.

Please just look to the last part of my code titled procedure:

When I run my code without (last funciton f #f := (x,y) -> 0;) see last lines to find "f". It's runing, there is no problem. But when I put add f, there is an error. Many think  for any help.

Procedure
Using the previous suty in section stencil we can write the procedure to solve the Laplace equation in [0,1]*[0,1] with the boundary condition Neumann conditions on the vertical boundary and Dirichlet boundary condition on the horizontal baoundary. In our study we will use the same stepsize h in x and y direction.

PoissonSolve:=proc(N,_f)
local Z,i,h,y,x,sys,w,f,sol,j,u,Data;
# define basic grid parameters
Z := i -> (1/(N+1))*i;
x[0] = Z(0),x[N+1] = Z(N+1),y[0] = Z(0),y[N+1] = Z(N+1);
h := evalf(Z(1)-Z(0));
# Fix the boundary data and the source matrix
for i from 0 to N+1 do:
# Neumann boundary condition
u[N+1,i] :=  u[N,i] ;
u[0,i] := u[1,i];
# Dirichlet boundary condition
u[i,0] := 0;
u[i,N+1] := 0;
od:
f := Array(0..N+1,0..N+1,[seq([seq(evalf(_f(Z(i),Z(j))),i=0..N+1)],j=0..N+1)],datatype=float);
# Write down the system of equations to solve and solve them
sys := [seq(seq(Stencil(h,i,j,u,f),i=1..N),j=1..N)];
w := [seq(seq(u[i,j],i=1..N),j=1..N)];
sol := LinearSolve(GenerateMatrix(sys,w));
# parse the solution vector sol back into "matrix" form
for i from 1 to N do:
for j from 1 to N do:
u[i,j] := sol[(j-1)*N+i]:
od:
od:
# generate a 3D plot of the solution using the surfdata command
Data := [seq([seq([Z(i),Z(j),u[i,j]],i=0..N+1)],j=0..N+1)]:
end proc:

Here is an example of the output when the source function is set to zero
f(x, y) = 0
; i.e., when  reduces down to Laplace's equation:
#f := (x,y) -> 0;
#PoissonSolve(10,f);

Question8.mw

### how to call a procedure using named parameter bind...

March 13 2014
2 7

I could not find a way to do this in Maple looking at http://www.maplesoft.com/support/help/Maple/view.aspx?path=parameter_classes

and I see that Maple is missing from http://rosettacode.org/wiki/Named_parameters

Is it possible to call a Maple proc using named parameters? Here is an example of what this looks like from a small Ada example from the above link:

`procedure Foo (Arg_1 : Integer; Arg_2 : Float := 0.0);`
`Foo (Arg_2 => 0.0, Arg_1 => 1);This is very useful for proc with many arguments, and it also makes the code much more clear and less change in using the wrong value for the wrong parameter.In Maple notation, this can be likefoo:=proc(arg1::integer,arg2::float) ..... end proc;foo(arg2=>10,arg1=>200);(This editor is so bad, can't someone fix it?)`
 1 2 3 4 Page 1 of 4
﻿