Mac Dude

1122 Reputation

13 Badges

7 years, 243 days

MaplePrimes Activity


These are replies submitted by Mac Dude

@Lali_miani As written, you do not have a "system". In your file there are merely three procedures, or functions, each one takes three arguments.

Now, you can rewrite these three procs as one vector function that transforms the vector <x,y,z> into a new one <x2,y2,z2>. Then you can talk about things like fixed points etc., which would be the vector <x,y,z> that gets transformed into itself. I am not sure it exists for your system as it is not homogeneous (actually, I am sure it does not exist in general as e.g. f1 returns II + something, which can never be x unless II is 0, likewise for f3 which returns alpha). A quick try with solve did not return a solution for such a vector <x,y,z>, as expected.

Maybe I am missing something here, but then the problem needs to be clarified.

Mac Dude

@Christopher2222 Maple is a computer-algebra system. I really do not see how web-browser functionality is essential for that.

Besides, there are more than enough bugs and problems with Maple I am dying to see fixed. Sidetracking the Maple develper team with providing web-browser functionality seems a distraction and only likely to further delay bug fixing.

My $0.02,

Mac Dude

Consider yourself lucky. Maplesoft stopped supporting my perfectly fine G5 PowerMac after Maple 15 (and there is no 20 in front of the 15)... :-)

Mac Dude.

 

@vv Thanks much for your suggestion.

Let me give a little more detail: My problem arises from expression involving constructs like this:

(and the real ones are a lot longer that this snippet). The difficulties for taylor are then obvious: id d1kQ1 is negative (in this case) the sqrt can get imaginary. This should be easily solved by assuming dkQ1 to be within (-1..+1), say (which would be totally acceptable for my case). Except that I find mtaylor to barf at the assumptions, or ignore them, or just return unevaluated (I found the behaviour to be not reproducible). Sometimes regular taylor works better.

I am enclosing a worksheet that demonstrates some of the issues. It also shows my attempt to use vv's mseries, which was not successfull. I spare MaplePrimes listing it here as it involves too many endless numbers (all of course generated expressions).

I cooked up a quick & dirty one:

mymseries:=proc(f,vars,norder)
      local i,fs:=f;
          for i from 1 to numelems(vars) do
              fs:=convert(series(fs,vars[-i],norder),polynom);
          end do;
          return fs;
      end proc;

but it has some issues. First and forward, it does not control the order the way mtaylor does in that it will keep bilinear and higher-order products as it only expands by one variable at any given time. I can fix that with a final mtaylor (which will work on the result) but certaily have not proven yet that the end result is correct. I also don't like the for...next loop.

Thanks again,

M.D.

mtaylor_test.mw

So while the underlying problem is not any different, I did find a work-around to address my problem: In the original definition I used the self:- construct in a function definition to refer to another element in the same Record (which should be perfectly legal code in a function). That, in conjunction with the subs command, appears to be broken now (and contrary to my assertion above, it is already broken in Maple 2015). So I moved some of the expressions out of the Record definition and made them functions and then use these in the Record definition. That seems to work. I am concerned, however, as I have other packages that use similar constructs. I guess I should be prepared for some breakage.

For completeness sake I am appending the updated version of the package code.

M.D.

BooMBA.mw

 

@Carl Love I stand corrected.

Still the OP should get the Programming Guide. It is a treasure trove, even if one does not write many modules or packages.

M.D.

 

@Ronan You really want to get a (pdf-) copy of Maple's Programming Guide. You can download it from Maplesoft's support pages, specifically, this page has near the bottom a link to the Programming Guide:

http://www.maplesoft.com/documentation_center/

It answers most of your questions (and some you didn't even know you had).

Some easy answers: Yes, you can have a variable number of parameters. You can set defaults for each one. You can use Null as a parameter value when you call a function or procedure. The Programming Guide explains all of that.

As for your types; I have written packages that define and use their own types. So I know the scheme Carl proposed (with the AddType statements in a ModuleLoad proc) works. Make sure you are calling ModuleLoad(); before the end module statement. The module definition and ModuleLoad() can appear anywhere, I think...

I am not sure about your use of the "uses" clause. AFAIK, you just say "uses TypeTools" after which TypeTools is added to the list of namespaces that get searched. In other words: your equation in uses may not work. Personally, I get around such bother by using fully qualified names everywhere in my packages (i.e. TypeTools:-AddType()). Yes, more typing when writing these packages, but much easier to debug & trouble-shoot.

I hope this helps,

M.D.

Edit: Replaced some redundant remarks.

 

I somewhat beg to differ: one confirmation dialog before nuking and post should be ok. After all, one does on occasion hit the wrong button (well, I do at least). It could be argued, however, that similar safety escape can be provided with an undo button that shows up after a deletion (spam or otherwise) of an entry.

M.D.

@Ronan Well, the .help file has to be where Maple can find it. libname has the list of directories (folders) Maple will search. Myself, I prepend the directory with my own files to the others in libname and comingle the .mla code files and the help databases in there. In that way, my own stuff comes first should there be any name clashes (which you really want to avoid).

So, yes, moving the .help file to such a directory matters.

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.

 

5 6 7 8 9 10 11 Last Page 7 of 37