Mac Dude

1571 Reputation

17 Badges

13 years, 89 days

MaplePrimes Activity


These are replies submitted by Mac Dude

@Carl Love Thanks, Carl, I think your suggestion will work for me.

There is a question about differentiation that escaped me up to now: differentiation of delta(x) by x is actually questionable (to say the least, as delta(x) is already "almost a differential"). I can see however situations where one wants to differentiate >by< delta(x), which diff won't allow. I guess I'll cross that bridge when I get to it... for now I am good.

Sorry, I don't understand Axel's comment either. It does appear that limit has issues with delta as defined here; I get

limit(delta(x),delta=0)

so it returns unevaluated. Again, for now I'll defer this until I actually need it.

Thanks,

M.D.

 

@Dira Ok, now we are talking.

As you probably realized, the differential gives you the slope of the tangent; you still need the intercept to be able to plot it. The plots package, incidentally, is a part of your Maple installation. As >always<, look for things in the help facility. That help screen should always be open and at your side.

Anyway, here is a part of the solution that should get you on the road. To understand this, you need to be aware that the "->" operator defines the assigned name as a function. Also, "plots:-display" means run the display command of the plots package (I am simplifying here but that is what this is doing). Help plots will tell you what you need to know. The eval construct for the slope is your way of telling Maple to evaluate the differential at the point x=c).

f:=x->exp(x);
slope:=eval(diff(f(x),x),x=c);
intcp:=f(c)-slope*c; # get the intercept by demanding that the point on the curve has to be on the tangent also

c:=3;intcp; # that is your first point for the tangent
g:=xx->slope*xx+intcp; # the tangent function

plots:-display(plot(f(x),x=0..5),plot(g(x),x=0..5));# plot both curve and tangent and display the result.

M.D.

It might conceivably be helpful if you were to state what f is?

In the absence of that; the tangent of f(c) is eval(diff(f(x),x),x=c). That should be pretty much all you need. As far as the plotting is concerned, rtfm. It's all in the help files for plot and the plots package.

Mac Dude.

 

@ThU Thanks to both you and Kitonum. I can work with this.

M.D.

@John Fredsted Just out of curiosity, how long are typical programs you guys write in Maple? I find that a few 100 lines is about the max. I really want to program in one unit. Longer than that and I'll break it up into a package and the main routine, which then becomes short again. More general stuff I pull in from (my or Maple's) packages anyway. Maple is a powerful language so one can do a lot in even a short amount of code (but y'all know that:-).

The reason I am asking is that, while I agree with many of the complaints, I do wonder about the significance, unless the programs get really long. Yes, it is a bit annoying to need to manually format code to show its structure. Some people love syntax coloring. I personally would love to have a split view into a worksheet so I can see different pieces of my code (and I do find it annoying that I cannot even open the same worksheet in two windows). But for short programs the idea of using Emacs to write the code and then run it using read or in the cli version or whatever seems to me a lot more annoying (and Emacs is my editor of choice for text files and I am certainly familiar with it). A part of Maple's attraction is that I can change something & quickly rerun the worksheet to see the effect and also that I can inspect any variable right there (actually a nice feature of the GUI). Now if there was just a cmd key to trigger a rerun rather than having ti hit those triple !!! with the mouse... On the other hand, if one has 1000s of lines of code then the GUI just does not cut it, and I can well see that one goes nuts trying to debug in it.

BTW, months ago I remember someone was spamming MaplePrimes with advertising for a Maple IDE. I forgot the details, but I seem to remember that Maplesoft was actually going to take over the code. While it costs extra, if one is really that desperate maybe that is an option? Is it still around??

M.D.

 

@Carl Love 

Great, thanks.

M.D.

@Carl Love uh.. nice, at least for me. Since these are gray I somehow never thought about investigating that button (gray=deactivated on OS X). Isn't quite what I was thinking about as it isn't general but certainly helpful.

Thanks,

M.D.

@John Fredsted I was too busy this week to even log-in to MP but no; unfortunately i have no idea where on Windows you might find the JVM logs. On OS X there is a console app that lists them all (well those that are are in standard locations).

M.D.

@John Fredsted While I haven't experienced your particular problem I have certainly had Maple hang on me many (too many) times. One particularly annoying class of freezes is when the Java front-end (i.e. the "Standard Worksheet") freezes up. In that case no amount of hitting the red bug is going to bring it back. In my cases (on Mac OS X) I often find the "Maple 17" process (which really is just the front-end) chewing up CPU while "mserver", the compute engine, does nothing.

Is it possible that Java chokes on the keys you (accidentally) hit? Is it even remotely possible that your keys bring up some kind of Java dialog that may be hidden?

If there is a Java log file it may be worth inspecting that.

Mac Dude

 

@acer Your contribution is maybe the most useful one in this thread as it gives the reader a scheme how to do this to whatever generality or not (s)he needs. Many thanks.

I actually wonder: Is there a way to "pin" this thread so it can be found quickly? Casting trig functions in certain forms are one of the aggravating issues with Maple (and probably all CAS); I certainly have repeatedly beat my head against the screen (figuratively speaking) trying to get Maple to do what is trivial on paper. The problem is often that one >needs< to get it done in Maple to be able to use the result in further computations, so just "knowing it" is not enough. Finding an old thread in MaplePrimes is unfortunately difficult-to-impossible and in most cases quite time consuming.

Just my $0.02

Mac Dude.

 

@ecterrab Edgardo, I will be able to check it on Maple 17 tomorrow.
The input that triggers the problem is kind-of lengthy so I wanted to spare people looking at a lenghty file, on the off-chance that someone (like you) might recognize from experience what is going on.

I do understand that the Physics package is updated constantly. I actually use relatively little of it so I do not, at this point, think it is a question of features; more likely one of either a bug, or equally likely of something I don't understand.

I'll be back.

Mac Dude

@acer 

I guess I should have been more persevering...

M.D.

@Carl Love Many  thanks. I am not in a position to test this right now, but will soon.

M.D.

@acer ER... not really. I was following Carl's suggestion (#1) which in fact got rid of the original error msg.

But it is still not working; can't get past the error I cite in my reply to Carl's suggestion.

M.D.

 

@Carl Love You are correct, and your fix#1 got me over this hurdle. There was another problem I ucovered (Ci is protected) so I changed that name. The call now reads

plots:-animate(Statistics:-Histogram,[dR*~'WindowN(RP0,Can,CangleWidth+Can)',ignore=true,view=[-0.5..0.2,0..10]],Can=-0.1 .. 0.1);

but now I am getting

Error, (in plots/animate) expected non-empty data set, received Vector(0, {})

(after some time so it clearly is dong something in between). I know the Histograms are for real over the whole range. I added viewing ranges to make sure at least frames are produced. CangleWidth is properly set (to 0.05).

WTF?? Sometimes Maple is driving me up the wall.

Thanks anyway,

M.D.

First 28 29 30 31 32 33 34 Last Page 30 of 42