Items tagged with format

Also available: format

Hello, Currently when I calculate something, for example R=U/A where R is resistance, U is voltage and A is current, I get the answer in Volt/Ampere in stead of ohm. How do I change that?

Then, if the result is something like 3.124*10^-4 , how do I make maple output this in an engineering way, this would be 10^3, 10^6, 10^9 etc. to begin with?

Sorry if I formulate this wrongly, English is not my first language and I could not find an answer to this after some research.

Thank you


UPDATE and solution: for future reference:

You don't need to type out the whole unit like this:


in stead you can do this:


I got the V and A from the SI Units palette on the left hand side,


To answer my own question about the engineering notation, this can be "forced" by clicking on "Format" -> "Numeric Formating..." -> Engineering and then choosing the number of decimals. apply and set as default. After you are going to have to copy and recalculate your math as the !!! wont do it.

for i from 0 to 3 do print("rawData[", i, "] = new double[] { ", hello(i+1), ",", data[i+1], "};") end do

wrong format after copy to notepad from the maple 15

do not know why it insert a empty line, and make "};" in another line

and there is unexpected " 


wrong format example:

"rawData[", 0, "] = new double[] { ", 73.25, ",", 0.1510425143,

"rawData[", 1, "] = new double[] { ", 73.15, ",", 0.3974080269,

"rawData[", 2, "] = new double[] { ", 72.85, ",", 0.4661517269,

"rawData[", 3, "] = new double[] { ", 73.25, ",", 0.3974080269,


expected format:
rawData[0] = new double[] { 25.0, 20.0 };
rawData[1] = new double[] { 27.0, 34.0 };

Hi there,

I used to work with Maple 15. In Maple 15 the input-font-color was a beautiful plain red. Now I have to work with Maple 17, where the font-color was changed to a way darker red. 

I found a way to change the color in a single worksheet with Format-->Character-->Color. But I want to change it globally and permanently, so that every time I create a new worksheet the color is automatically red.

Do you have any ideas how to get this managed?

Thanks a lot!


Is there a way to export worksheet to pdf format but not in A4 size since some lines are going beyond the page?

There is a slight display difference of the code between showstate() and print(). It has to do with '` name `' use where print does not show the outside '' characters.

Here is an example


and now using print


When I used


and looked at the source code there, it matched what showstat(`dsolve`); gave and not the print command. Is there a reason why print does not show all those extra characters exactly as in the source code? It seems a formatting issue, but it is better to be looking at an exact copy of the source code.

If I want to make a display of data, say 2 columns of data, with a heading on top of each column, how would one go about this in Maple? This will be for display purposes only (say for final result of a homework result, etc..)  

In Mathematica, I use the Grid command. I am not sure how to do this in Maple. I could not find Grid like command in Maple.

I can generate the data in 2 sequences  in Maple, but need to insert a heading, and also need to insert frame around eveything.

Here is an example:

    #data = [[0, 0, 0], [1, 1, 1], [2, 4, 8], [3, 9, 27], [4, 16, 64], [5, 25, 125]]

The above data has 3 columns, 6 rows. I need to insert first row also called {"index","f","g"} and then display all in nice table form. This is how I would do the above in Mathematica to give idea of what I looking for

f[x_] := x^2;
g[x_] := x^3;
data = Table[{i, f[i], g[i]}, {i, 0, 5}]
    (* {{0, 0, 0}, {1, 1, 1}, {2, 4, 8}, {3, 9, 27}, {4, 16, 64}, {5, 25, 125}} *)

And this is below the part I do not know how to emulate in Maple:

data = Insert[data, {"i", "f(i)", "g(i)"}, 1]
    #   {{"i", "f(i)", "g(i)"}, {0, 0, 0}, {1, 1, 1}, {2, 4, 8}, {3, 9, 27}, {4, 16, 64}, {5, 25, 125}}
    # now use Grid to format with frame around everything
Grid[data, Frame -> All]


I would like to know how to generate super/subscript characters in axis label. I have tried the double underscore (atomic variable style) and the super/subscript under "Format" in document mode but no luck at all. Any comment/suggestion is truly appreciated.

Yu-Hung Lien





At the moment, I am using


> printf(StringTools[FormatTime]("%c\n"));
Thu Jul 31 14:28:08 2014

# lots of things here

# lots of things here

# lots of things here


To write a time and date stamp into my result1.txt file.

I understand that I can't write : into file names, but is there a way to writeto file using a more informative file name with date and time, such as,

Result_Thu Jul 31 14-28-08 2014.txt


Is that something can be easily formatted?



Say sometimes, I need to copy and paste results from Maple output, either in 1D or 2D or self formatted (see this).

Sometimes, it works fine, with just a single ">" sign, like this

> v1:=[
eta[p2] = 0.260 ,
eta[p3] = 0.113 ,
eta[p4] = -0.013 ,
eta[p5] = 0.215 ,
eta[p6] = -0.189 ,
eta[phi2] = 0.020 ,


But sometimes, it looks like this:


> v1:=[
> eta[p2] = 0.260 ,
> eta[p3] = 0.113 ,
> eta[p4] = -0.013 ,
> eta[p5] = 0.215 ,
> eta[p6] = -0.189 ,
> eta[phi2] = 0.020 ,
> .......ect
> ]:


Below is a screenshot from what I get when I copy the above synatex into Maple :


Personally, when I type in multiple synatex, I tend to use shift+enter, to avoid the use of many ">"s.


It does not have any effect in practice, but is there a way to improve this? I dont like seeing many many ">"s.

I have a big expression with multiple terms. The expression is kind of :

expr = a*ln(u) + b*ln(u) + a*ln(v)+b*ln(v)

I want to factor ln(u) and ln(v) to get (a+b)*ln(u) + (a+b)*ln(v)

I tried factor(expr,ln(u)) but I get the error :
Error, (in factor) 2nd argument, ln(2*da+(4*da^2+4*d^2-4*da*Sigma[a]+Sigma[a]^2+Delta[b]^2)^(1/2)-Sigma[a]), is not a valid algebraic extension.

I tried without Delta[b] and Sigma[a] : deltab and sigmaa but it didn't work either.

Do you have an idea how to factor the many ln ?



I would like to format the solution given by maple.
I have the answer given by a paper and I would like to reproduce the same formula.

I have the expression :


I would like to assume deltaa = a1-a2 and sigmaa = a1+a2.

The issue is that algsubs(deltaa = a1-a2, expr), my a1+a2 is replaced by deltaa+2*a2 and same for algsubs(sigmaa = a1+a2, expr), so i can't have sigmaa*ln(...) + deltaa*ln(...).

And all my squares are developed, for example I have : sqrt(1/4*a1^2+1/4*a2^2+1/2*a1*a2+...)

I can't put them in canonical form (1/2*a1+1/2*a2)^2 to get (1/2*sigmaa)^2.


Sorry for my english,
If you know how to do, i would be really grateful !



       I have a huge sparse matrix (1.5e6 x 1.5e6) of both symbolic or non-symbolic form. When I export matrix using ExportMatrix command, it is not writing the matrix in order of rows and columns. To further explain the problem,

          Let A be that huge sparse matrix. I am using


We expect the output to be,

 1 1 0.1

 1 10 0.65




But it is writing the output as


100 1 0.25

100 25 0.65

Hence it is not writing in order. What is the way we can force it to write in order? I do understand using for loop will consume more time.

1 heading 1

   1.1 sublevel 1

         1,1,1 subsublevel

    1.n sublevel n

2 heading 2



Is there a way of importing data in NetCDF format into Maple 15? This format is very widely used in atmospheric sciences as a data standard for experimental data such as satellite-derived data.




I am working on a project where Maple's output is fed to another software which requires all it's input in specific format. So, I want to print this expression,say

y=+2.*x+.2, in this software, but it takes input as

y=2*x+0.2, So now I have to change

+2. to 2.0 or 2 (if it's starting of the equation)

-2. to -2.0

.2 to 0.2


Is there any way to convert all the numbers in the equation to...

1 2 3 4 5 6 7 Last Page 2 of 38