gkokovidis

2370 Reputation

13 Badges

20 years, 291 days
Draeger Medical Systems, Inc.

 

 

Regards,
Georgios Kokovidis
Dräger Medical

MaplePrimes Activity


These are answers submitted by gkokovidis

Here is one way using the Statistics package.

restart:

with(Statistics):

X := Vector([1, 2, 3, 4, 5, 6], datatype=float):

Y := Vector([2, 3, 4.8, 10.2, 15.6, 30.9], datatype=float):

Fit(a*x^b, X, Y, x);

 

Regards,
Georgios Kokovidis
Dräger Medical

restart:

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

PE:= 3*x(t)^2 + 4*x(t)^4;

KE:= 2*v(t)^2;

TE:=PE+KE;

plot(TE,x);

Does this work for you when you use your equations?

Regards,
Georgios Kokovidis
Dräger Medical

Review your original definition of J.  There is a section where you have a floating point value entered:  -3.0-3*n4*n10*n8*n2+3*n4*n10*n7*n1

If you get rid of the floating point value (-3.0) and replace it with a fixed point value (-3), then you get a solution fairly quickly.  Hope this helps.  Again, review your original input and make sure you entered it correctly.

 

Regards,
Georgios Kokovidis
Dräger Medical

So, for example, if vector A is defined as below (your version of vector A would have 200 entries in it, i.e your real world data), then you can assign your DeltaX's to each of the elements of A.  Is that accurate?

Adding to the previous example:

A:=Vector([29328,4328,4489,2138,48934]);

seq(DeltaX[j]=A[j],j=1..5);

or you can do it manually, for each value if you choose.

DeltaX[4]=A[4];

and so on.

 

Regards,
Georgios Kokovidis
Dräger Medical

Here is one way.  I built an equation with 5 entries to demonstrate.  If this works for you, then make the appropriate modifications.

restart:

eq:=DeltaX[i];

eq2:=[seq( eq, i=1..5 )];

Divisions:=Vector(5,eq2);

 

Regards,
Georgios Kokovidis
Dräger Medical

Subtract one from the other.  If the answer is zero, then both expressions are equal. 

 

Regards,
Georgios Kokovidis
Dräger Medical

restart:

for a from 1 to 3 do sol[a]:=solve(x^2=16*a,x) end do;

sol[2];

sol[3][2];

Does the above code do what you want, or are you looking for something else?

 

Regards,
Georgios Kokovidis
Dräger Medical

 

Start with the help pages for the inttrans command.  Type the following at the command prompt, and hit the enter key:

?inttrans

Then you can scroll down and find a list of available commands, including
fouriercos and fouriersin.

Regards,
Georgios Kokovidis
Dräger Medical

The way you have your problem set up, equation2 := y = m2*X+c2 yields X-1.  This is an equation of a straight line.  If you want to integrate this over a range (you really do not need to do this, because calculus is not needed here), you can do it like this:

equation2:=m2*X+c2;

int(equation2,X=g..a);

                                       -.3050000000

 

Regards,
Georgios Kokovidis
Dräger Medical

If you add the line below to the end of what you show above, you will get 2.156829.

rhs(%[2]);

Then you can use that to subtract from the exact value that is returned from your function.  Is that what you are looking for?

Regards,
Georgios Kokovidis
Dräger Medical

Using iteration (which I have not shown), you can come up with a value for q very quickly.

restart:

q:=10: L:=q*x;

h:=(x+2)^2 - 15*x - 30;

plot({L,h},x=-20..25);

ans:=[evalf(solve(L-h,x))];

int(L-h,x=ans[1]..ans[2]);

Iterating on q you will get the answer you are looking for.  I used 10 as a starting point and then went down from there. 

 

Regards,
Georgios Kokovidis
Dräger Medical

Try File, Export As... and then from the drop down:-Files of type, select Maple Text (.txt).  Then you should be able to open the output that is created in a standard text editor, which will allow you to cut and paste.  Not exactly what you are looking for, but it works.

 

Regards,
Georgios Kokovidis
Dräger Medical

Here are a couple of ways, (both the same), depending on how you have the list assigned.

>[[1,15,21],[5,7,33]];

>map(op, [%[1],%[2]]);
>sort(%);

or

>L:=[[1,15,21],[5,7,33]];

>M:=map(op, [L[1],L[2]]);
>sort(M);

 

 

Regards,
Georgios Kokovidis
Dräger Medical

One way.  There are others.  For more examples, see ?geometry

> restart: with(geometry):


> square(sqr,[point(A,0,0),point(B,8,0),point(C,8,8),point(E,0,8)]):


> segment(ll,[point(F,0,0),point(G,8,8)]):


> draw([ll,sqr],thickness=4);


 

Regards,
Georgios Kokovidis
Dräger Medical

 

You might find the following thread useful, or not.  It covers most of the things you are talking about, except the "automatic" part.   It is a good starting point, to complement the help pages.

 

Regards,
Georgios Kokovidis
Dräger Medical

First 27 28 29 30 31 32 33 Last Page 29 of 75