Maple 18 Questions and Posts

These are Posts and Questions associated with the product, Maple 18

Suppose that we have the following curve on a unit sphere

r^2+z^2=1

phi=pi/3

-1<=z<=1

which is the implicit equation of a circle in "cylindrical coorinates" (r,phi,z) on the sphere.

How can I plot this curve without solving the implicit equation for r or z ?

Also, I don't want to make any parameterization.

I want to obtain polynomial representation of my data:

with(Statistics):

X:=Vector([huge data package-X],datatype=float):

Y:=Vector([huge data package-Y],datatype=float):

NonlinearFit(c*t^2+b*t+a, X, Y, t)

but I can't see any result. What's the problem?

My worksheet: He_p=f(t).mw

Suppose I have the parametric equations of a circle

x=cost

y=sint

where t runs from 0 to 2*pi. How can I show the orientation of this parametric curve on a plot?

Suppose that I have the equation x=1. I want to manipluate it. For example, I want to multiply by 2. Then, Take the power of two. Next, take a cubic root. How can I do this in Maple?

I am currently trying to solve a geometric problem where I have to calculate angles in two connected four bar linkages parallel to a serial chain of rotatory joints (closed-loop kinematic chain).

The angle is calculated with

 > alpha:=arctan(exp_y, exp_x):

The expressions exp_y and exp_x contain long products of sines and cosines of 6 other time-dependant angles, square roots of these products, constant geometric lengths (not time-dependant) and constant geometric angles (not time-dependant).

The lenghts are already assumed positive

 > assume (l1>0): # similar for all lengths l2, l3, ...

The time dependant angles are defined as

> qJ_t := Matrix(6, 1, [qJ1(t), qJ2(t), qJ3(t), qJ4(t), qJ5(t), qJ6(t)]): # generalized coordinates of the system in the sense of technical mechanics

Other assumptions are not set, since the angles can be positive as well as negative.

Calculating this expression takes up to two days on a fast computer. In my opinion this takes much too long compared to other calculations with similar amount of variables (more complex robotic structures).Also, the arctan function does not "calculate" a result, it just writes down "arctan(...)".

Is there a way to speed up this calculation e.g. by using more assumptions?

On the arctan help page, the examples suggest that Maple is trying to already simplify the solution e.g. by drawing Pi out of the solution.

 

 

 





 



Hi

My function is shown below:

restart;

f:=(x,y)->evalf[5](2*x*Int(sqrt(1+y^2*(t*x-1)^2/(1-(t*x-1)^2)), t = 0 .. 1)):

printf(" x     y     f(x,y)\n");    

for x from 0.1 to 1.9 by 0.1 do

for y from 0.1 to 0.9 by 0.1 do

printf("%g   %g   %g\n",x,y,f(x,y));

od; od;

 


I want a relationship as follows to be fitted values of x,y, f(x,y)

f(x,y)=a1*x*sqrt(1+y^2*((a2*x-a3)^2/(1-(a4*x-1)^2)))

a1,a2,a3,a4=Coefficients that must be determined

 

how to answer of materix export to Excel.

restart;

Digits:=5;

f:=(x,y)->2*x*evalf(Int(sqrt(1+y^2*(t*x-1)^2/(1-(t*x-1)^2)), t = 0 .. 1)):

for i to 20 do

for j to 11 do

a[i,j]:=f(0.1*i, 0.1*(j-1));

od: od:

interface(rtablesize=infinity):

A:=Matrix(20,11, (i,j)->a[i,j]):

V:=<seq(i,i=0.1..2,0.1)>:

W:=Vector[row]([cat(x,` \\ `,y),seq(i,i=0..1,0.1)]):

<W, <V|A>>;

I want Positive values of Arcsin but maple give to me Negative values of Arcsin?

my function is f=arcsin(1-x), 0<x<2 and f>0. and f(2)=3 pi/2 but in maple f(2)=-pi/2.

I want positive values of f Without adding anything to f.

Thanks.

It took me a while to figure out what was causing this unusual sort result;

I loaded the MTM package because I want to convert numbers to integers for indexing. This sort result seem like it could be a bug.

Sort a List of Floats

NULL

with(MTM):

NULL

x := [1/3, 0, 4] = [1/3, 0, 4]``

``

sort(x) = [0, 1/3, 4]``

NULL

f_x_MTM := [seq(convert([x[n], n], float), n = 1 .. 3)] = [[.3333333333, 1.], [0., 2.], [4., 3.]]NULL

sort(f_x_MTM) = [[.3333333333, 1.], [0., 2.], [4., 3.]]NULL

NULL

unwith(MTM):

f_x := [seq(convert([x[n], n], float), n = 1 .. 3)] = [[.3333333333, 1.], [0., 2.], [4., 3.]]

NULL

sort(f_x) = [[0., 2.], [.3333333333, 1.], [4., 3.]]

``

 

Download MTMsort.mw

The CIELAB perceptual model of human vision can be used to predict the color of a wavelength in sRGB. I found the CIEDE2000 corrections to hue, chroma, and lighness were required to get the right values in the blue to violet region. The CIEDE2000 results seem pretty close to what I see looking through a diffraction grating considering I have no way of knowing how my eyes are adapted.

Use the new, faster  version. It can run in under 1 minute;

nprocWavelength_Color_CIEDE2000.mw   and  WtoC_data.xlsx

You will need the data for the color matching functions in the WtoC Excel File. The data directory can now be controlled in the mw file.

 

I am having trouble removing assumptions that are stored within expresssions.

Example code:

assume(l1>0): # this assumptions later helps to find a solution for a geometric problem with two four-bar-linkages
a := sqrt(l1);
save a, "test.m";
restart;
read "test.m"
a; # the assumptions are stored within the saved data
l1:='l1'; # try to remove the assumption
a; # assumption in a still existing
subs({l1=2}, a); # nothing happens: I can not access l1 any more
subs({l1~=2}, a); # This does not work either, nothing changes in a

So my question is: How do I remove the assumption within a stored expression?

My main problem lies in the handling of the expression with assumptions. At some point, I want to generate Matlab code, and the codegen-command gives me:

Warning, the following variable name replacements were made: l1~ -> cg

 

Variable exists but is not shown when using save/read with extension .m

My example maple code is

 

a:=b^2:

save a, "test1.m"

restart:

read "test1.m"

a;

 

after the read command, I can access the variable, but it is not shown under "Variables".

This lead to some confusion when debugging the worksheet. Can I change this somehow?

Using the input type file format is not a solution, since then reading takes forever for complicated expressions.

Further, in the read command documentation it says "This functionality is not intended for end users" for saving the file as .m. What does that mean?

I don't know what is the problem with this. Please take a look at it. Any help is appreciated. Thanks.

restart

with(RealDomain)

[Im, Re, `^`, arccos, arccosh, arccot, arccoth, arccsc, arccsch, arcsec, arcsech, arcsin, arcsinh, arctan, arctanh, cos, cosh, cot, coth, csc, csch, eval, exp, expand, limit, ln, log, sec, sech, signum, simplify, sin, sinh, solve, sqrt, surd, tan, tanh]

(1)

with(Slode)

[DEdetermine, FPseries, FTseries, candidate_mpoints, candidate_points, dAlembertian_formal_sol, dAlembertian_series_sol, hypergeom_formal_sol, hypergeom_series_sol, mhypergeom_formal_sol, mhypergeom_series_sol, msparse_series_sol, polynomial_series_sol, rational_series_sol, series_by_leastsquare]

(2)

ODE := x*(diff(y(x), x, x))-(diff(y(x), x))-x*y(x)

x*(diff(diff(y(x), x), x))-(diff(y(x), x))-x*y(x)

(3)

SS := convert(sin(x), FormalPowerSeries)

Sum((-1)^k*x^(2*k+1)/factorial(2*k+1), k = 0 .. infinity)

(4)

FPseries(ODE = SS, y(x), v(n))

Error, the right-hand side of the differential equation must be a polynomial or a series in x

 

``

 

Download AA.mw

I want to obtain the taylor series of a function say sin(x) at x=0 up to infinity. I mean that I don't want a trauncated series. I tried using "series" and "taylor" but they just give the truncated series.

Why maple is not plotting the whole surface in the domain specified?

Thanks for the help.

First 50 51 52 53 54 55 56 Last Page 52 of 86