acer

32348 Reputation

29 Badges

19 years, 330 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are replies submitted by acer

@leafgreen 

There are two ways to enter subscripts: as indexed names, or with double-underscore. The subscripting is just a visual effect, ie. their 2D-Math pretty-printing.

Your problematic example contained the wrong kind of subscripted name, the indexed name, which is not valid as the parameter of an operator/procedure. As mentioned above, the double-underscore variant is valid as operator paramater.

Now, you say that there are other places in your worksheet that looked similar... and worked. It seems unlikely that you entered the wrong variant by keyboard typing, in the problematic example (since you seem previously unaware that both were possible). One scenario is that you did a copy and paste of the double-underscore variant. In at least some older version of Maple there was a GUI bug, where a mouse-copied double-underscore name got pasted in as 2D Input of the indexed name.

What version are you using?

 

@quo When using an option name or value such as none, you may have to ensure that it doesn't collide with some another bound verson of that name (say, the export of a loaded package, or the name of a local at the current level).

So you can try using it as ':-none' instead of just none.

The colon-minus makes it mean the global version of the name, to guard against such collision. And those unevaluation quotes (single right-quotes) guard against the case that the unprotected global name might have been assigned.

 

@Iza Do you get Tom's result if you replace that line by,

Force[i,..]:=convert(map(rhs,[op(fsolve({r1, r2}, {H,V_A}, H=0..1))]),Array);
or,
Force[i,..]:=Array(map(rhs,[op(fsolve({r1, r2}, {H,V_A}, H=0..1))]));

@gaurav_rs another way would be to scale and translate the portion, bound it with a rectangle, and display it all as true plots.

I once thought that would a burden, especially to make the "axes" and tickmarks in the insert (textplot). But given that the inset curve looks somewhat jagged when done as an Image, it might be worth the effort. A good reusable procedure to do it with true inset plots would need to handle scaling and offset details nicely.

@phil2 Indeed, there are IMO several better/safer ways to install DirectSearch than to place additional files in the "lib" folder of one's Maple installation.

In Maple 2017 one can install the DirectSearch package from the Maple Cloud (a new feature of Maple 2017). This unpacks the files into a "toolbox" folder, whose "lib" subdirectory gets recognized by Maple automatically (without setting libname).

Or one could follow the instructions in the .zip file, if installing by hand from the Application Center (including in older Maple). The last time I looked there was a README in the v.2 of the DirectSearch package available at the App Center. It described three other ways: 1) use the InstallerBuilder .mla which self-unpacks to a toolbox folder, 2) create a toolbox folder in the appropriate place, and copy files there by hand into a "lib" subfolder, or 3) place the files in any convenient folder and then set libname in a Maple initialization file.

Could you not use CodeGeneration to produce the actual syntax of your target language?

@gaurav_rs I made a Reply to your duplicate of this followup discussion here. I uploaded a worksheet showing a slightly different method (using Maple 18 which you mentioned using).

@gaurav_rs Attached is a variant, in which the inset is an image, as background inside an actual plot. This allows the outer plot to be exported as .eps encapsulated postscript, using say the right-click export mechanism.

I had to scale up the size of the temporary image so that the curve in the inset didn't suffer so much from artefacts (loss of the antialiasing, I suppose).

I used Maple 18.02.

plotinplot2b.mw

The bookkeeping of the scaling details is hard-coded for this example. But you should be able to fiddle with all that for your point-plot.

 

@quo The command DocumentTools:-Tabulate accepts an optional argument typesetting=extended which allows the prettyprinting to be done the way you want, I hope.

You sent me a worksheet made in Maple 2016.2. Here's the Tabulate bit, done with your Vector in two slightly different ways, using Maple 2016.2.

One way makes  a 1x1 GUI Table with a prettyprinted Vector in it. The other way makes a 30x1 GUI Table where each Table Cell contains one of the entries of the Vector.

The first way requires interface(rtablesize) to be at least as large as the Vector.

I adjusted both to use 1750 pixels for the width of the surrounding Table, which seemed a nice fit on my 64bit Maple 2016.2 for Linux. If it doesn't look right then you might have to adjust that, say for MS-Windows or Mac OS X (where the font size might have an effect).

eqs_extended.mw

 

 

Perhaps check Maple's own security settings, under Tools->Options from the main menu bar.

Why is there a derivative of g (evaluated at point 1) in the BCs? is it a typo for say g1 or g5 or...?

@gaurav_rs I won't have access to a computer with Maple for a few days.

But it's not clear what code you've executed, surely you must see that. Upload an attached .mw file (big green arrow) with all your code. Is fn assigned an Image (in the ImageTools sense) or a string (file name)?

If it's an Image then in modern maple you could try,

plot(axes=none,background=fn)

and then export as .eps format.

If it's the filename of a .bmp format file then you could use the ImageTools commands Read and Write to read in the .bmp and Write out to .jpg format. Or read in to get an Image thing, and then plot as above.

If you upload code I can look at it a bit later, and as I mentioned I think I could do it better than before, with modern Maple.

@gaurav_rs If fn is an Image (in the ImageTools sense) then you should be able to use ImageTools:-Write to export it as a jpg file. Or in modern maple you could try,

plot(axes=none,background=fn)

and the export that plot to .eps format.

It's not clear from your very short comment above what exactly you did to compute the value assigned to `fn`.

Yet a fourth way (possible now but not when this Question was originally posed) is to make the subplot be a positioned image on the background of the whole plot. This too should allow the subplot's axes to look right with less effort, IMO. Maybe I can find time to try and automate this better (though automatic placement of the subplot can be hard in general).

@quo I'm away from any computer running Maple for the next 5-6 days, but I'll look into your question then (I might answer in your other thread...).

I'm not sure which Maple version you have, and whether you're using typesetting=standard or typesetting=extended (as an `interface` command option, or as set under Tools->Options->Display from the menubar). It might make a difference, in say the prettyprinting done by Tabulate. But perhaps useful for me to know anyway...

First 275 276 277 278 279 280 281 Last Page 277 of 592