Items tagged with eval eval Tagged Items Feed

I'm taking calculus and my professor introduced us to maple software. The professor asked us to plot the families of curves for this orthogonal equation:

dy/dx = (x^2) - (2y^2) - C = 0

This is what I had so far:

 

restart;

with(DEtools):

with(plots):

 

Function:=unapply(simplify(x^2-2y^2-C),(x,y)):

'Function'(x,y) = Function(x,y);

plotFunction:=C->implicitplot(eval(F(x,y),a=C),x=-5..5,y=5..5,scaling=constrained):

plot1:=display(seq(plotFunction(a),a=-5..5)):

display(plot1);

 

This is only display one family. How do I code for it plot the other families?

(The graph should look like curves converging from left, top and right sides toward to the origin of the axes)

Please help.

Hi there!

I wrote a piece of code which spits out the numerical datapoints (x,y(x)) corresponding to a function y(x). So that the result is accurate, I need quite a lot of data points - currently I am working with 5k.

In order to work with this function later, I interpolated it with a Spline. For instance, I would like to sample the function values on a fifferent grid, etc.. However the evaluation of this function really takes up hell of a lot of time, and the reason seems to be, that it, being a spline on 5k nodes, is simply a huge expression.

Is there a better way to do this? Are other fitting functions than a spline maybe better suited?

Thanks for help!

 

Does anybody know why the answer of a equation i am getting on maple is coming with "eval" written?

Example:

 

the answer should be a number ...

Why does it happen?

 

 

intergration

f:=Intat(1.0000000000000000000*(1.7969454312181156991*_f^1.2+1.80)^1.2/sqrt(-1.4974545260150964159*(8.9847271560905784954*_f^3+14.640368911168931285*_f^2+30.220202497712627297)^1.2), _f = 0);

 

I tried to use  value(f);  eval(f); simplify(f); expand(f), but non provide an answer, but return an integral unevaluated.

 

Is there a command to produce a  numerical result ?

Why does the following statement not evaluate, or better yet, how can I make it do so?

 

A:=value(floor(p)) assuming p>0,p<1,p::real;

or

A:=simplify(floor(p)) assuming p>0,p<1,p::real;

or any one of a lot of different attempts along the above lines, all of which seem (to me) that they should yield

A:=0

rather than

A:=floor(p)

which is what I get.

Thanks in advance

Hi all,

I am having some problems when solving high order polynomials. When oders are 'high' and systems involve multiple variables, Maple is slow to do so.

See in worksheet for detailed codes.

slow.zip

kappa - gives the vector that i am interested in

sC - a reparameterisation which has 'summation' in it

Aim is to verify that it works (it should!)

I currently ask...

Hi,

Say for a 126 by 18 symbolic matrix, substituting numerical values into the matrix DD1 takes about 10 seconds (using time() );

for a 62 by 16 matrix, take just about 1/5 second.

By when the matrix is about 254 by 20, it take much longer! More than a minute!

I never actually waited how long, but I am wondering if there is something wrong? Am I using the right command?

Say the matrix is DD1 with numpar:=[x=0.3,y=0.2,z=0.98,....]

 

Hello Community,

Wondering if anyone has run into the problem outlined in my code below. I am looking to evalute a commutator involving Pauli spin matrices. One of the matrices is squared. Such a commutator should evaluate to zero. However, the way I implemented it below doesn't give such a simplified result. See Result 7 below. Any suggestions as to how to get Maple to evaluate the exponential before the Commutator? Or to otherwise get to a final, simplified result?

hi, 

I am a newcomer user(maple16) and am trying to make a graph of energy * time forced oscillation
but I'm having this problem

script:

> restart;

> x := unapply(A*exp(-b*t/(2*m))*cos(`ϖ`*t+phi)
                  +Fmax*cos(psi*t-theta)/sqrt((k-m*psi)^2+b^2*psi^2), t);

> v := unapply(diff(x(t), t), t);

> E := unapply((1/2)*m*v^2+(1/2)*k*x^2, m, v, k, x);

> E2 := subs(v = v(t), x = x(t), phi = arctan(-vo/(xo*omega...

Why do the statements eval(sign(x),x=-2) and subs(x=-2,sign(x)) both give plus one while sign(-2) gives -1 as expected?

eval(sign(x), x = -2)

                             

#hi guys i have a new challenge. and i need your help again, my problem is to map a  piecewise function and #evaluate  with a matriz. thus 

A := LinearAlgebra:-RandomMatrix(2, 3);
B := piecewise(a+b < x, a.x+b^2, a+b < x and x < a^2+b, x^2.b+a.x);

A := convert(A, listlist):

#this is my last try to do that.

LL := map(((proc (a, b) ->( a+b < x, (a.x+b^2)/(a+b), a+b < x and x < a^2+b, x^2.b+a)@op), %):

#i...

eval command problem...

August 15 2012 sinat 10

hi guys,

say i have an expression like this:

i would like to nknow how can i eval a function wiith a matrix?


> restart; with(ArrayTools); with(LinearAlgebra); with(MTM);
 varhi := 10; 
varlo := 0; 
npar := 2; 
popsize := 9; 
par := (varhi-varlo)*RandomArray((proc (A) local i; 
if A::(rtable[column]) then 
seq(A(i), i = 1 .. NumElems(A)) else
 args; 
end if 

odd ratio evaluation...

June 30 2012 AliKhan 10

oddratioeval-_maplep.mw

Hi all,

I need your kind suggestion to solve the equation for odd ratio.  I am attaching Maple file for the purpose.   I have to evaluate a function for odd ratio and for other values its zero.  I need help in assigning this odd and even ration to the function.  k can vary from 1...15, depending on ratio.

I shall be very thankful for your kind responses.


I need to solve some  transcendental equations, using Maple 16 which i need to transform or bind with java later. My problem is I cant evaluate.

Equation I would like to evaluate is  k= ln((M-m)/m(k-1))offcourse I  defined m and M, prior to c.
Both  eval(k) and evalf (k)  only return k,  I need value for further calculations.

1 2 3 4 Page 1 of 4