Items tagged with function function Tagged Items Feed

Hi

I'm trying make Maple write the actual result, when i differenting an expression: x[s] := x(t)+sin(theta(t))*a.
when i differentiate with respect to t, i get:

> diff(x[s], t);
=
print(`output redirected...`); # input placeholder
/ d \ / d \
|--- ()(t)| + cos(theta(t)) |--- theta(t)| a
\ dt / \ dt /

Maple, writes the expression as a table, but i need to see the normal function? Why does it do that? And how can i make it show the expression as a normal function?


When i derive the two parts serperately i get the normal result, but as soon as i add them together, i get the table rasult again?

Is there an easy trick for this one?

-Nicolai

 

 

Consider the function

 

 

The above definition may result in four cases depening on r and x.

Can Maple calculate automatically all possible cases and the corresponding Maxima, Minima and Values at intervals limits?

 

Hi all

Assume that we have a function, say f(t) and we want to substitute t in it where t is:

t=[0,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1]

by subs or other better command, how can we do it?

best wishes

Mahmood   Dadkhah

Ph.D Candidate

Applied Mathematics Department

with(plots)

inequal((2*c-1)/(3*c-1),c=0..1.5,Alpha=0..1)

 

with(plots)

inequal((2*c-1)/(3*c-1),c=0..1,Alpha=0..1)

 

Why are the results of the two orders above so different???

A bug in the function of inequal???

Hello,
Maple does not cancel out a variable.

Why is that?

Is there a way to solve this? 

(I pasted my code on the bottom of this message)

 

Thanks for your help/advice,

Stephan

restart:
M(x):=piecewise(x<=l,1/2*(q*x^2)/(EI)-3/8*(q*l*x)/(EI),l<x,1/2*(q*x^2)/(EI)-13/8*(q*l*x)/(EI)+5/4*(q*l^2)/(EI)):
M(x):=M(x)*(-EI);
# simplify() does not work.....?
M(x):=simplify(%) assuming EI>0;
# Wiht EI cancelled out by hand it schould look like:
M(x):=piecewise(x<=l,1/2*(q*x^2)-3/8*(q*l*x),l<x,1/2*(q*x^2)-13/8*(q*l*x)+5/4*(q*l^2));

 

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.

 

Hi there,

I was trying to simulate the behaviour of a one-variable, discrete-time function having three parameters.

The function reads

M[n+1]=(b·theta^(m)·R[n])/(theta^(m)+R[n]^m)

defined for b, theta, m > 0

Say I want to simulate the function for the following values

b := [seq(1 .. 10, 1)];
theta := [seq(1 .. 5, 1)];
m := [seq(1 .. 2, 1)];

for n from 1 to 10.

 

I guess I need to build a 4-dimension array. But I was not able to find the right way to do this: should I use the Array strucutre? and if yes, how would I do it? As far as I've read, indexing would be an issue: should I create special indexing functions?

If I'm not wrong Maple matrices (Matrix) are just 2D.

 

Once the values of M computed, I would like to generate the corresponding plots, varying one parameter while the other two are fixed, and drawing the different M's in the same plot.

How can I achieve this?

Furthermore, if I would like to generate all possible combinations, I guess I would need to insert the solution given to the above question within a for loop. Will Maple display all plots or will it overlap/overwrite the preceding plot if used within a loop?

 

Thanks,

jon

In Maple, I want to define a set of functions by means of two for loops:

    printlevel:=2;

    # Node coordinates.
    N_x:=5;
    N_y:=4;
    N_elx:=N_x-1;
    N_ely:=N_y-1;
    h_x:=(x_e-x_s)/N_elx;
    h_y:=(y_e-y_s)/N_ely;
    x_n:=[seq(x_s+j*h_x,j=0..N_elx)];
    y_n:=[seq(y_s+j*h_y,j=0..N_ely)];

    # Partition of unity.
    for j from 2 by 1 to N_x-1 do
        for k from 2 by 1 to N_y-1 do
            phi[j,k]:=(x,y)->(x-x_n[j-1])*(x-x_n[j+1])*(y-y_n[k-1])*(y-y_n[k+1])/((x_n[j]-x_n[j-1])*(x_n[j]-x_n[j+1])*(y_n[k]-y_n[k-1])*(y_n[k]-y_n[k+1]));
        od;
    od;

However, this gives output in which the `[j,k]` vary but the `x_n[j-1]`, `x_n[j+1]`, `y_n[j-1]` and `y_n[j+1]` are not evaluated. But if I for instance input `x_n[3]` I correctly get 1/2 as answer.

How do I solve this?

Hi

How can I substitute a function in a matrix? This is what I tried but it's not working at all:

lign1:=x-y+2*z=1:
lign2:=(-2)*x+y+z=0:
lign3:=(-4)*x+y+7*z=2:
lign4:=3*x-2*y+z=1:
T := GenerateMatrix([lign1, lign2, lign3, lign4],[x, y, z], augmented);

Then I'd like to substitute another function with lign1:

lign5:=x+y+z=6:
T2:=subs(lign1=lign5, T);

But T2 = T and that wasn't really the point.

 

Sorry if the answer is obvious no amount of searching has helped me so far. I hope this question isn't too ridiculous.

Thanks

Hello,

 

I have a function, lets say g(x,y,...), that depends on many other functions. But I don´t want the results that are inside certain intervals, and I need to receive the results of those functions as something like NULL when asking for a result that is inside any of those intervals. That way, g(x,y,...) would also have to result in something like NULL if any of the lesser functions are NULL fora any given values.

 

I tryied using the piecewise command, and for the intervals that I wanted, it worked, but for those I wanted to be NULL, they were understood as 0, and so G(x,y,..) continued to exist but with a very different value.

 

To clarify what I need, I will try an exemple:

 

Imagine I have the function f(x)=x

 

I want to disconsider the results for x<2 and x>6, in a way that if I try the command 'f(1)', I will receive something like NULL and know that it is outside the range.

 

In the same way, I need the plot of this function f(X) to show the function only from 2 to 6, but not existing for the delimited intervals.

 

Ad if I continue and make g(x)=f(x)+10 , I don´t want g(x) to exist if f(x) doesn´t exist, and same for the g(x) plot, which shouldn´t be shown in the intervals where f(x) don´t exist.

 

 

Thank you very much for your atention!

 

 

Hi there,

first post. I am a beginner both with Maple and this forum, so please forgive my mistakes. Just here to learn.

I could not successfully use the Maple editor here, so the code goes as plain text, although I also attach the code: MapleSimulation_test.mw.

I am trying to simulate the function below for certain values of the parameters, but when executing the loop, Maple prints just R. Can anyone tell me where my error is, please?

 

f := .25; g := 1; R[0] = 5; R[1] = 4.8; nDays := 30;

lambda1:=(1 - f + sqrt((1 - f) + 4*g*f)*1/2;

lambda2:=(1 - f - sqrt((1 - f) + 4*g*f)*1/2;


       -lambda2*R[0] + R[1]
k1:=--------------------------;
       lambda1 - lambda2

       lambda2*R[0] - R[1]
k2:=-------------------------;
      lambda1 - lambda2

R:=n-> k1*lambda1^n + k2*lambda2^n


for n from 2 to nDays
do R:=evalf(subs(n=%,R));
od;

Consider the following two variable funtion:

f(x,y)=x^2+y^2-5

then we want to draw a contourplot:

contourplot(f,x=-10..10,y=-10..100)

My problem is that I want maple to diplay the value of the function "f" relating to each curve on the contour plot!
How can I do this?

Please see the following code.

Example.mw

Hi. It is be good to be with you after 4 years.

I want to ask about Curvefitting for Data. If I have a numerical data and i want to find a function in x and y for these data.

 

 

but if restart the program,the menu of Plot Builder is appear,in same function(x^2+y^2+(1/1000000000)*z-25 = 0),why thing like this happen?

when run the order like this, the menu of Plot builder disapper

Thank you in advance for your help

1 2 3 4 5 6 7 Last Page 1 of 22