peter2108

80 Reputation

4 Badges

3 years, 146 days

MaplePrimes Activity


These are questions asked by peter2108

If I do:

df:=DataFrame(Matrix(3,4,[seq(1..12)]), rows=[a,b,c],columns=[A,B,C,D]);Tabulate(df, width=100)

 

The font that Maple uses for the Tablulate is much larger than the font used to display the Dataframe. How does one choose the font size that Tabluate() uses? 

Peter


 

with(StringTools)

s := "xABCx etc"; RegMatch("x(.+)x", s, 'm', 'n'); m; n; RegSubs(m = n, s)

"xABCx etc"

 

true

 

"xABCx"

 

"ABC"

 

"ABC etc"

(1)

s := "(ABC) etc"; RegMatch("\\((.+)\\)", s, 'm', 'n'); m; n; RegSubs(m = n, s)

"(ABC) etc"

 

true

 

"(ABC)"

 

"ABC"

 

"(ABC) etc"

(2)

``

In the second case RegSubs treats the expression m as containing special characters. Can one tell it to treat what it receives as a literal string - perhaps some "escape" function?
 

Download regsubs_problem.mw

EDIT  There is such a function. suffices.

 

Is it possible to output to the console without a new line being added. The code:

prints each number on a separate line. I want to print them all on the same line.

The docs say that you can assign initial values to a record as shown in this screenshot:

I would expect the last two lines of output to be 1, 2. The slighly more complicated example in the docs does not work as expected either. This is the worksheet: queery.mw

I can assign to a record subsequently, but that makes for very prolix code,

Thanks for any help.

Following creates a list of 10 numbers 1..10:

  L := []; for i from 1 to 10 do L := [op(L), i] end do;

Now suppose I have equations labelled (1) ... (10). Can I place these equations into a list by some analogy of the above code using the label references?

 

 

1 2 3 4 Page 1 of 4