pagan

5127 Reputation

23 Badges

16 years, 82 days

 

 

"A map that tried to pin down a sheep trail was just credible,

 but it was an optimistic map that tried to fix a the path made by the wind,

 or a path made across the grass by the shadow of flying birds."

                                                                 - _A Walk through H_, Peter Greenaway

 

MaplePrimes Activity


These are replies submitted by pagan

@Christopher2222 I'm sorry, did your original Question always say "from the commandline"? If so, then I apologize, as I was answering about the Standard GUI (in which case there is is a way, using TypeMK as I showed. It doesn't happen to be using printf per se, but then your wording did not read as if that aspect were a strict prerequisite.)

You're quite right, TypeMK is not documented, although several people like Alejandro J. and Robert I. have used it before on this site. It's also used for forming the new names known as "atomic identifiers", since the GUI reconnizes names that start with a certain substring, after which it interprets the rest of the name as if marked up. People have had to deduce some of how it works.

Anyway, for the commandline interface (CLI) the usual ANSI escape sequences work. You can use the 6 basic colors plus black or white (for each of the foreground and background), and make it bold, or underline, or have it blink. I think that I first did that succesfully with the CLI of Maple back in the early 90s. The CLI itself surely is doing the same, when it emboldens some (white) keywords in the text of help pages.

Just make a procedure, as I did above, that prepends your text string with the code for a color, and then appends it with the code to switch back to white. The you can printf that string and see the output colored, as long as your terminal shell supports color display (obviously).

What shell are you using, for running the commandline interface?

@Christopher2222 I'm sorry, did your original Question always say "from the commandline"? If so, then I apologize, as I was answering about the Standard GUI (in which case there is is a way, using TypeMK as I showed. It doesn't happen to be using printf per se, but then your wording did not read as if that aspect were a strict prerequisite.)

You're quite right, TypeMK is not documented, although several people like Alejandro J. and Robert I. have used it before on this site. It's also used for forming the new names known as "atomic identifiers", since the GUI reconnizes names that start with a certain substring, after which it interprets the rest of the name as if marked up. People have had to deduce some of how it works.

Anyway, for the commandline interface (CLI) the usual ANSI escape sequences work. You can use the 6 basic colors plus black or white (for each of the foreground and background), and make it bold, or underline, or have it blink. I think that I first did that succesfully with the CLI of Maple back in the early 90s. The CLI itself surely is doing the same, when it emboldens some (white) keywords in the text of help pages.

Just make a procedure, as I did above, that prepends your text string with the code for a color, and then appends it with the code to switch back to white. The you can printf that string and see the output colored, as long as your terminal shell supports color display (obviously).

What shell are you using, for running the commandline interface?

Did you run the animation, by clicking on the play button? (The initial plot is empty, but that's because it shows a parametric plot, and the initial length of the curve is zero.)

The aubmitter's example worked for me, using both 32bit and 64bit Maple 15.01 (on Windows 7). The Task manager showed GUI and kernel together using about 150MB or so. It ran without freezing.

Maybe the submitter's Maple session (GUI + whatever kernel reports) had already consumed lots of memory?

Did you run the animation, by clicking on the play button? (The initial plot is empty, but that's because it shows a parametric plot, and the initial length of the curve is zero.)

The aubmitter's example worked for me, using both 32bit and 64bit Maple 15.01 (on Windows 7). The Task manager showed GUI and kernel together using about 150MB or so. It ran without freezing.

Maybe the submitter's Maple session (GUI + whatever kernel reports) had already consumed lots of memory?

The submitter asked that the vertical axis label be in the English alphabet, not the Greek one. To attain the opposite of what was asked, for the vertical axis, simply labels=[beta,xi] would suffice.

I used xi in the example to show that some extra effort might be needed to force the names of Greek letters to be shown using the English language.

The submitter asked that the vertical axis label be in the English alphabet, not the Greek one. To attain the opposite of what was asked, for the vertical axis, simply labels=[beta,xi] would suffice.

I used xi in the example to show that some extra effort might be needed to force the names of Greek letters to be shown using the English language.

@Szumi It's extra work, but you can always try and line-break and/or center yourself, since it is LaTeX source.

Another possibility, using the Standard GUI, is to open the Tools->Options->Exports tab and adjust the "Math linebreaking width". That (still) might not center in the way you expect.

@Szumi It's extra work, but you can always try and line-break and/or center yourself, since it is LaTeX source.

Another possibility, using the Standard GUI, is to open the Tools->Options->Exports tab and adjust the "Math linebreaking width". That (still) might not center in the way you expect.

It wasn't quite clear whether you wanted procedures g(i) which evaluate recursively (in which case their bodies would contain unevaluated function calls to g) or which are merely constructed recursively (in which case their bodies might be explicit).

I can't (yet) tell if this is more what you want:

g:=proc(j)                      
local x;
  if j=0 then
    y->int(y*x,x=0..1)
  else
    unapply('int'(y*g(j-1)(x),x=0..1),y);  
  end if;
end proc:

Maybe you could state, explicitly, what you want g(6) to look like?

It wasn't quite clear whether you wanted procedures g(i) which evaluate recursively (in which case their bodies would contain unevaluated function calls to g) or which are merely constructed recursively (in which case their bodies might be explicit).

I can't (yet) tell if this is more what you want:

g:=proc(j)                      
local x;
  if j=0 then
    y->int(y*x,x=0..1)
  else
    unapply('int'(y*g(j-1)(x),x=0..1),y);  
  end if;
end proc:

Maybe you could state, explicitly, what you want g(6) to look like?

@dawagner That's how Maple's usual evaluation rules work, and quite a lot of Maple works properly because of it.

It is, however, number 8 on Robert Israel's list of top ten errors made by users new to Maple.

@dawagner That's how Maple's usual evaluation rules work, and quite a lot of Maple works properly because of it.

It is, however, number 8 on Robert Israel's list of top ten errors made by users new to Maple.

@dawagner You've forgotten to quote occultRatio. using uneval quotes so that it appears as 'occultRatio'(...) in the first argument to `plot`. That was issue number one as described above (and which Axel also covered earlier).

Here is a copy of the worksheet, edited: PlotFunctionWith-edi.mw

@dawagner You've forgotten to quote occultRatio. using uneval quotes so that it appears as 'occultRatio'(...) in the first argument to `plot`. That was issue number one as described above (and which Axel also covered earlier).

Here is a copy of the worksheet, edited: PlotFunctionWith-edi.mw

Considering Alejandro's comment (as 1D Maple notation input, not cut and paste as 2D Math input code)

`#mover(mi("ζ"),mi("~"))`;

is simpler than the above while producing 2D Math output that looks better than that from

`#mover(mi("ζ"),mi("˜"))`;
First 18 19 20 21 22 23 24 Last Page 20 of 81