Items tagged with datatype


Hello everyone,

I'm trying to solve system of ODE but it return this Error, (in fproc) unable to store 'YP[4]' when datatype=float[8]
How can this be corrected, see the worksheet


In ode solve command i generated a large array data. The output shows a large order matrix of this form


[110001x6 Matrix





I want to export this matrix into a notepad. Which can then be used for plotting in TecPlot. 


Looking for good response



Dear Maple users

I have a question, which is probably very basic, but I can't find how to handle it in the Programming Manual or elsewhere. I need to declare a parameter, which is a vector of lists. Example of element:

< [3,7,2,4], [-3,6,8,0], [-5,8,4,2]>

Vector has n components and each list has k components. I tried declaring it like:


and other ways, but it didn't work. How can it be done?...

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...


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,

I have an Array which storage consist ot other arrays with different 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.

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!!

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


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


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

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


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).

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.0000000000000004) x
> f(x):=1.*x^2.;( using CTRL+L to get the result)


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:





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

Am I missing some justification for this last one?

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