Mac Dude

1546 Reputation

17 Badges

11 years, 340 days

MaplePrimes Activity


These are replies submitted by Mac Dude

@acer You can get a catchable error by trying to read a property of the slider. In that way you can set a flag and also instruct the user (i.e. yourself) to setup the slider with the correct name. Not perfect, but at least you don't get the umpteen error windows stacked on top of each other.

I mod'ed your program. If you rename the slider to something other than Slider0 you'll get the mesage but the code runs fine (sans progress bar).

M.D.

prog14-2.mw

@Ronan I see that the Create command is commented out, so you are trying to use an extant .help file. If I recall correctly, that does not work. I believe you need to start with creating a new .help file & then stuff if with the help pages. So leave the first two statements (Create and Add) active and choose a unique name as not to clobber something important.

The help file structure changed not so long ago. I really doubt Maple 2016 introduced another file format. And my 2015 help files work in 2016.

M.D.

 

@Carl Love I always use solve with a list of eqs and a list of variables to solve for. tomleslie's reply below indicates that solve works with sets as well, which I did not know. A quick check of the docs confirms this. Since the OP was in a format I could not cut/paste I did not try myself.

My apologies for spamming MP with a not-well-researched "answer."

M.D.

 

@Carl Love Hmm... while I understand your reasoning I'd hate to implicate a large and somewhat diffuse group like this. So rather than trying to reason it, someone at Maplesoft should look at the logs & ferret out what is really going on & whether there is a pattern.

MaplePrimes is a valuable marketing tool for Maplesoft so I would argue losing it to spammers would not be in the interest of the company. At this point, I don't think this is an overly alarmist statement; if we users stop deleting the spam this board may well become useless and abandoned unless soeone at Maplesoft would step in. But then it is likely more effective to stop the spam at the gate.

M.D.

@Carl Love It would not take long to know whether Captchas would work. I have no idea how complex the programming would be, but they are not that rare so I suspect it is not that difficult. The added work of solving a Captcha at accocunt creation is not that onerous.

I wonder where these spam postings and account creations are coming from, whether all from a few addresses or completely random...? Most follow a quite predictable pattern & blacklisting certain IP addresses may be another way to reduce the amount of spam. Finding the IP addresses of the senders should be as easy as scanning the server logs with correlation to the spam messages.

M.D.

 

@taro The potential problem I see with using .mpl files is that you will likely want to use Maple in Document mode with 2-D input so you get all the nice typesetting Maple is able to do. .mpl files are written in 1-D input. So you get either only the last result from reading and executing the .mpl file, or it would be 1-D Maple input interspersed with the output... that may not be what you want. It is worth to experiment a little with this.

If you can define a set of higher-level commands in a package you will be better off, and potentially your work becomes easier to read. And yes, potentially your calculations become much shorter (although that really depends on the specifics).

When I said I keep my sheets short, what I referred to was that I would use separate worksheets for each section of the whole work; where section can be a chapter or something less. I cannot give a hard rule here; but my sheets of maybe up to 3 MB in general did not cause problems, whereas much longer ones would. It is not fully deterministic; in one case I had to split one into two sections as the whole thing just would not be manageable; with the Maple GUI periodically locking up on it. So it is not a question of the mathematical complexity but rather the complexity of the typesetting involved. It does make referencing to results in other worksheets more awkward: I just inserted the equation numbers as text and maybe put the particular equation or expression in. I do no tknow of a mechanism to dynamically link across sheets. For completeness I should mention that most of my experience in this regard is from Maple 18 and 2015; 2016 may be better.

M.D.

 

Just one clarification: The parameters in a function definition (i.e. a,b anc c in proc(a,b,c)) are not globals but rather formal parameters that get replaced by their values upon a call. Indeed, Maple does not let you assign to these, and while occasionally annoying that probably leads to cleaner and less error-prone coding practice.

I do think you need to declare globals if you want true globals. I often get warnings that such_and_such_name is declared local by default when I run my modules and forgot to declare a name.

Mac Dude

 

@tomleslie  I am relatively certain that the key sequence to recalc. a worksheet is fairly new as I remember looking for it & never finding one.

A quick check on my Maple 15 installation shows that none of ctrl-shift-enter, cmd-shift-enter and friends work here. I think on newer versions (2015; 2016) cmd-shift-enter works (all this is Mac OS X).

Of course, by now I am so used to not have a keyboard shortcut that I always hit the !!! button...

Mac Dude

 

Assuming you are really looking for help I suggest you re-phrase your question in standard English with a minimum of interpunction. Also please tell us what you were  trying to do when the error was encountered.

M.D.

Well, it is trying & not getting anywhere.

I'd be a bit concerned about the a[i] constructs as I have seen Maple tripping up on things like this before. If you use a relatively new version of Maple you can replace the [i] indices by __i, which makes the a__i atomic rather than elements of a table. I do not see an obvious mistake in your code, but names subscripted using [...] are tables for Maple whereas you use them as if they were just names. The "__" form avoids this.

If you have any idea of the rough location of the solution you can enter that as a starting point. RTFM on how to do that.

If possible try a simpler case with only a couple of equations first.

Finally, do you know there is a [real] solution?

M.D.

 

@gubach Thanks much, gives me an idea what you are trying to do. In the meantime, vv has shown with remarkable terseness how Maple can indeed produce such transformed images with much less effort than I thought. I think that gives you most of what you need.

Cheers,

Mac Dude

 

@vv I agree basically with most you say. However, if you apply your conformal function (which is f(w)=w^2 with w=x+I*y) to the image of the horsies you will find that it actually does not work all that well. The resulting dimensions are huge, and the transformed image has "holes" in it due to the discrete nature of the indices. These "holes" have to be filled by (2-d) interpolation and the transformed image will have to be scaled down to a reasonable size. The transformed image is also not rectangular but gets stored in an rtable, so decisions about clipping etc. have to be made. By the time this is all programmed the whole procedure has grown a bit more complicated than just the application of the transformation rule. It may be possible that the 3-d plotting routine of Maple does some of the interpolation itself, but I am not sure of that in this case.

Which serves to impress it on the OP that there is some work needed to produce images like the one he references. I do not know what ImageForwardTransformation in Mma does and how much is left to do; in Maple most of the work has to be programmed by the user. Incidentally, the referenced Mma-generated images do look like the originals had the origin at the center. While translation indeed preserves conformality, the actual transformation result is different as conformal mappings are in general nonlinear.

Mac Dude.

@vv  and to the OP: While it is true you can setup an arbitrary transformation this way, conformal (angle-preserving) mappings are tricky, can have infinities, and if done with indices like above one needs to take special care so the result is meaningful, does not have holes, etc. Also, in many cases the origin has to be defined to end up with the desired result.

If the OP were to tell us what he wants to map and the mapping function, maybe we could help implementing it.

I have no idea what Mma does, but I would expect it to be a lot more intricate than the above if it were able to do a conformal mapping in a straightforward way with a minimum of help by the user.

M.D.

@MortenZdk Actually, once setup it is not particularly complicated.

Note that the read() business is not really necessary; for smaller modules you can put the code directly into the file (Lattice.mw in my  case). The directory sequence you setup once. Each time you update your package you run its .mw file and bingo, every sheet uses the updated package (if it has a restart before loading the package). Think of the creation of the .mla file as a compilation step and the .mla as an object library. (There is no real compilation ongoing of course.)

M.D.

@MortenZdk Well, the way I do it is by having one directory that holds all my packages. I then save all my packages in .mla form in that directory and tell Maple where it is in my .mapleinit file.

Specifically:

read("/Applications/Math_Calc/Maple 2015/Packages/Lattice/Lattice4.mpl"); # reads in the code (same as mentioned above in my 1st answer to your question)

LibraryTools:-Save(Lattice,cat(libname[1],"/Lattice.mla")); # this saves it as a package that will autoload upon with()

libname;
 "/Applications/Math_Calc/Maple 2015/My_Maple_Libraries",

   "/Library/Frameworks/Maple.framework/Versions/2015/lib", "."

So libname in my case is a sequence of three directories, the first one being my own. For that reason I use libname[1] in the above cat() statement.

The read and the LibraryTools:-Save re in one small .mw worksheet. Each time I update the package (Lattice) I just run that procedure and it replaces the .mla file which is the oneloaded upon with(Lattice). The small .mw file and the libname list are machine specific, once these are set the rest, including updating, is the same everywhere I run Maple.

The actual code I update using emacs and Joe Riel's maplev mode for emacs.

HTH,

Mac Dude

First 11 12 13 14 15 16 17 Last Page 13 of 42