cloz54

65 Reputation

4 Badges

11 years, 24 days

MaplePrimes Activity


These are questions asked by cloz54

Hi,

Since a couple of years ago,  SQLite has been enriched with a bunch of new math functions not existing in previous versions: acos, asin, atan, atn2, atan2, acosh, asinh, atanh, difference, degrees, radians, cos, sin, tan, cot, cosh, sinh, tanh, coth, exp, log, log10, power, sign, sqrt, square, ceil, floor, pi. 

Examples: In SQLite version 3.39.4 2022-09-29 15:55:41 we can invoke:

sqlite> select pi();
3.14159265358979

sqlite> select power(2, 3);
8.0

sqlite> select floor(2.35);
2.0

Package Database[SQLite] in Maple 2022.2 does not recognize these functions.

In oldest versions of Sqlite3 we were able to add these functions after loading an external extension with sqlite3 api function load_extension() (see  https://sqlite.org/contrib/download/extension-functions.c), but his option is blocked in Maple:

dbName := "d:/sq3_maple/etc.db":
sq3Extension := "d:/sq3_maple/extensions.sq3":

with(Database[SQLite]);
[Attach, Bind, ClearBindings, Close, ColumnCount, ColumnNames, 
  Execute, Fetch, FetchAll, FetchRow, Finalize, Open, Opened, 
  Prepare, RESULT_BUSY, RESULT_DONE, RESULT_ROW, Reset, Step]

conn := Open(dbName):
Execute(conn, sprintf("SELECT load_extension('%s')", sq3Extension));
Error, (in Database:-SQLite:-Execute) not authorized

Am I missing something? Any way to add these functions to SQLite in current version of Maple?

Thanks in advance.

César Lozada

PS: SQLite is updated in Mathematica 13.1

 

 

 

Hello,

Any form to display

 

as

 

?

of course, for 

Thanks in advance,

César Lozada

 

Hi,

I'm just trying Maple 2020.

In Maple 2016, a package may be loaded at restart by creating the file: 

c:\Program Files\Maple 2016\Users\maple.ini

and writing in it:

libname:= "F:\\Maple\\Trilinears", libname: 
currentdir("F:\\Maple\\Trilinears"):
libname:= "F:\\Maple\\mysql", libname:

 

But this does not work in Maple 2020.

What is the workaround for loading these packages when restart is executed?

Thanks in advance,

César Lozada

 

 

 

Apostrophe '  is always interpreted as a "differentiate command", i.e., A' is always translated  to diff(A(x),x).

Is it possible to override this behaviour, it is to say, is there a way for using A' as a variable name?

In euclidean geometry of triangles, A' is a common name given to some points built from vertex A of a triangle ABC.

Thanks in advance,

César Lozada

 

 

 

 

 

 

 

 

 

Hi,

I couldn't find a command or tool for searching a value in a multi-dimensional list/array/matrix. Does it exist?. 

I wrote this:

 

 

where

pSearch: proc for searching

A: list, array, vector or matrix


 

Examples with a list:

> ss := [[1, 2, 3], [2, 3, 5], [2, 4, 5]]
> j:=1:
># search first index i such that ss[i, j]=2

> nPos := 

# search next index i such that ss[i, j]=2

> nPos := 

 

But I am not sure if this procedure is efficient for large lists or arrays and I would suggest (if this tool does not exist yet) a more efficient one.

César Lozada

 

 

 

1 2 3 Page 1 of 3