40 Reputation

10 years, 40 days

@Axel Vogt Thank you once again!Bis...

@Axel Vogt Thank you again!

Bisection method is much more faster!

Function fnKepler1()

Dim t#, xl#, xu#, xold#, xr#, ea#, b As Boolean

'tolerance
t = 0.000000000001

ea = 1
xl = t
xu = 1

Do While ea > t

xr = (xl + xu) / 2

ea = Abs(xr - xold)

b = xr < K1(xr)

If b Then
xl = xr
Else
xu = xr
End If

xold = xr

Loop

fnKepler1 = xr

End Function

Function K1(x)
With WorksheetFunction
K1 = Sin(2 * .Pi * x)
End With
End Function

VBA Loop...

Thank you!

Here is my VBA code:

Sub Kepler()
Dim c#, xtmp#, x#, Delta#, tol#

'constant
c = 2

'tolerance
tol = 0.0001

'variable start value
x = tol * 2

Do While x <= 1

xtmp = Sin(c * x)

Delta = Abs(xtmp - x)

If Delta < tol Then Exit Do

x = x + tol

Loop

End Sub

Thank you. Hope Maple will fix the bug....

Thank you.

Hope Maple will fix the bug.

Press right mouse button inside narrow w...

Press right mouse button inside narrow window to get a normal size of code-edit window

@Rouben Rostamian  Thank you for yo...

@Rouben Rostamian  Thank you for your help!

I created 2 functions to get the input list of lists from the detail() function:

 (1)

I use the centroid() function for my rectangular squares in my work. It returns the correct result. It would be great if Maple will upgrade the squares to rectangles (I mean the area() function) :)

Sorry, my fault....

My libname path should look like this:

libname := ( libname,
"D:/Temp/MTest/libTest2.mla"
);

libname := "C:\Program Files\Maple 2015\lib", ".", "D:/Temp/MTest/libTest2.mla"

Now there is no errors any more. Thank you once again!

Thank you!!!...

You're absolutly right!

I was using with(Units[Standard]) in startup code.

In Maple Help I found this:

The with(Units[Standard]) command does not allow the use of the short form of the Units package commands that customize the dimensions, units, and systems of units. It is necessary to enter the with(Units) command. For a list of the commands in the Units package, see Units.

Perhaps it is a mistake?

Using with(Units) does not cause this error, but another error appeares

 > with(Units):
 > # # Reset the libname variable to include the library # created earlier. Obviously OP will have to change # file path/name to correspond to that supplied above #   libname :=  "D:\\TEMP\\MTest\\libTest2.mla";
 (1)
 > # # Check that variables now exist and can be used in sums # # Everything seems to be working!! #   A__1;   A1;   5*A__1+3*A1;
 (2)
 > B:=A__1*A1
 (3)
 > B

Thank you for quick reply but... Maple ...

but...

Maple 17 x64. Very strange, isn't it?