30 Reputation

5 Badges

3 years, 86 days

MaplePrimes Activity

These are questions asked by Sauberschrauber

Dear Forum,

I get data from a mass-spectrometer and want to do some analysis on it . 

What I get looks like this : ( only a few lines, the files are very large )

t[s]; scanId; m/z; I[A]; pTot[mbar]
2.00;0;0; 0.000000e+000; 0.000000e+000
4.00;0;0; 0.000000e+000; 0.000000e+000
441.00;0;0; 0.000000e+000;1,29E+00
443.00;0;0; 0.000000e+000;1,29E+00
453.00;0;0; 0.000000e+000;1,26E+00
455.00;0;0; 0.000000e+000;1,24E+00
463.00;1; 0.390625;8,14E-05;1,23E+00
464.00;1; 0.40625;1,23E-04;1,43E+00
464.00;1; 0.421875;1,73E-04;1,43E+00
464.00;1; 0.4375;2,27E-04;1,43E+00
464.00;1; 0.453125;2,77E-04;1,43E+00

When I add some blanks, it looks like this :  

t[s];        scanId;   m/z;              I[A];               pTot[mbar]

464.00;  1;           0.421875;     1,73E-04;     1,43E+00

The columns are separated by semicolon

t[s]  and m/z are separated with a dot,  I[A]  and p come as exponentials with a comma.

When I try to import this  with

 BKK := Import("H:\\Maple\\Spielwiese\\BGSample.csv")

I get a DataFrame with two columns -correct-  because there are two commas. 

Is there a way to import such data without preprocessing into maple ?

I include the data file, had to change the suffix to .txt - the original is .csv

Thank you and kind regards, 


BKK := Import("H:\\Maple\\Spielwiese\\BGSample.csv")

module DataFrame () description "two-dimensional rich data container"; local columns, rows, data, binder; option object(BaseDataObject); end module


BKK[10, 1] = 27.NULL



Dear Forum, 


I want to make a Document where some values are initialised and left alone afterwards.
The startup-code seems to be the solution. The manual says, it is executed, when the document is reloaded.

But if i execute the document with "!!!" the startup-code is executed too. 
How can I avoid this ? 
Is there a good way to write "run once" code ?


Thank you very much



startup code is  : 


After reloading, this should be false  init = trueNULL

the startup code should be executed after reloading but is executed when the code is executed with !!! . init is set to false again
If the code is executed stepwise , ! by ! , it behaves as expected.

if not init then x := 3; y := 4; init := true end if

2*x = 8NULL

x := 4



2*x = 8NULL






Dear forum,

my name is Klaus, I am a former mathcad-user and new to maple. I try to get some sheets converted and found a maple-behaviour I don't understand.

I made up a simple function with an if statement. When I try different inputs by hand, I get correct results.
But if I try to plot it, I get the message that the if-statement does not work.

My question : How can I solve this ? And what is the difference between plotting a function and entering values manually ?


funktion := x -> if 2*Unit('m') < x then 1/x; else 2*Unit('m'); end if;

r1 := 3.0*Unit('m');

r2 := 6*Unit('m');

plot(funktion(x), x = r1 .. r2);
Error, (in funktion) cannot determine if this expression is true or false: 2 < x*Units:-Unit(1/m)

Page 1 of 1