# Items tagged with datatypedatatype Tagged Items Feed

### datatype=float with imaginary values

April 01 2013 by Maple

Thank you for the suggestions. Float command helped me a lot for real matrices but when I have imaginary numbers in my matrix it gives me error.

after I construct the matrix A I do = implies  Af:= Matrix(A, datatype= float):

That gives me error message ' Unable to store 0.-18844.3412345686*I ' when datatype=sfloat'    is there a solution for that like complex_float "? I  looked at Maple help but I could not find...

### ImportMatrix does not work on files with ...

November 07 2012 by Maple

0

2

Hello,

I am trying to force Maple to read big matrices from files, produced by other programs (GAP in my case).

The output looks like this after it's been saved in a *.txt file:

[ [ 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0,

### Protect an Array(datatype=anything)...

August 16 2012 by

0

8

I have an Array which storage consist ot other arrays with different datatypes...so my question is: Is there a way to protect this Array from being scaned from the garbage collection? I've got that if an array is saved as hardware float datatype it wont be touched from the gc, but how to do it when the datatype is not a hardware float? Might be something like MapleGcProtect, but not for external calls !!!

Thanks in advance.

### Error, (in f) unable to store....when...

June 25 2012 by Maple

0

3

Hi guys,

i solve the equations of motion for a triple pendulum(Eq17,Eq27,Eq28). After that, I applied numerical values and initial conditions to solve these equations numerically. But unfortunatially i get the following error.

> g := 9, 81; l[1] := 5; l[2] := 3; l[3] := 1; m[1] := 5; m[2] := 3; m[3] := 1;
> ini := &varphi;[1](0) = (1/3)*Pi, (D(&varphi;[1]))(0) = 0, &varphi;[2](0) = (2/3)*Pi, (D(&varphi;[2]))(0) = 0, &varphi;[3...

### Interesting behavior!!!

June 12 2012 by Maple

0

0

Interesting behavior!!

> restart
> N := 150; L := LinearAlgebra[RandomVector](N);

150

> st := time(); for j to 10^4 do ArrayTools[SearchArray](~[=](L, max(L))) end do; time()-st;

...

### Tables as datatype for efficient maple...

March 09 2012 by Maple

2

2

Hi all,

I wonder if it makes sense to use tables as datatype for efficient maple code. I need this datatype to pass parameters to a procedure which is called many times.

In particular, I have the following criteria:

* efficient (fast) to access for read and write.

* potentially thread save ( I can also imagine having individual copies for each thread)

* present in future Maple versions

* easy to transform into C-code later

### Arrays: override

February 16 2012 by Maple

1

3

how to override Array type? Want workaround next behaviour for float array:

a:=Array(1..10,datatype=float)

a[1]:=((2)^(4/9)+sqrt(2));
Error, unable to store 't^(4/9)+2^(1/2)' when datatype=sfloat

i.e. to call convertor before assignment. Can i principally to do so?

And yes, no hfloats. I need sfloat. Sow in help that some types could be created like objects (stack, queue etc).

### inaccuracies i powerFit

September 16 2011 by Maple

I need a power regression function and I need it to be accurate, look what happens

> X := Vector([1, 2, 3, 4, 5, 6], datatype = float);> Y := Vector([1, 4, 9, 16, 25, 36], datatype = float);> PowerFit(X, Y, x);                                            (1.9999999999999998)      (1.0000000000000004) x                          > f(x):=1.*x^2.;( using CTRL+L to get the result)                                         1.9999999999999998

### Unexpected behaviour with chrem and...

July 05 2011 by Maple

1

5

I wrote some code involving chrem that broke in a recent version.

> y := Vector([0]):
> yp := Vector([1]):
> trace(chrem);
> chrem( [y, yp], [1,3] );
{--> enter chrem, args = [Vector(1, [...], datatype = anything), Vector(1, [...], datatype = anything)], [1, 3]                                        n := 2                                    v, m := [0], 1                                        v := 0

### I have a problem using (assume) and ...

July 14 2010 by Maple

3

4

Hi there. I have two expressions of type Matrix(7x1), one I entered directly and the other one is the result of a  procedure calling. They only differ by the term [1,1], so when I do a comparation of the appropiate submatrix using Equal I get a positive answer:

>Equal(SubMatrix(atataaV(1,1,1,1,u1),2..-1,1),SubMatrix(u1,2..-1,1));

true

Now, the elements of the submatrices depend on the symbol 'n',...

### Am I missing something?

May 31 2010 by Maple

1

5

Am I missing some justification for this last one?

> zip(/,Array([3]),Array([9]));
[1/3]

> zip(/,Array([3],datatype=integer[4]),Array([9]));
[1/3]

> zip(/,Array([3]),Array([9],datatype=integer[4]));
[1/3]

> zip(/,Array([3],datatype=integer[4]),Array([9],datatype=integer[4]));
[0.333333333333333315]

 Page 1 of 1