Carl Love

Carl Love

28045 Reputation

25 Badges

12 years, 332 days
Himself
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are replies submitted by Carl Love

@Kitonum An easy generalization to any number of dimensions, with the input and output both being vectors:

PV:= proc(v::Vector) 
local x:= `tools/genglobal`(:-_x), pv:= Vector(upperbound(v), symbol= x);
    eval(pv, solve(v.pv, {seq(pv)}))
end proc: 

Or, a simpler version, allowing the user to specify the free global stem:

PV:= proc(v::Vector, free::name= :-_X) 
local pv:= Vector(upperbound(v), symbol= free);
    eval(pv, solve(v.pv, {seq(pv)}))
end proc: 

@vv Thanks for finding that. Here's a correction:

f:= z-> z/abs(z)^2:  r:= t-> exp(I*t):
IntegrationTools:-Change(Int(f(z), z= r(-%Pi)..r(%Pi)), z= r(t));
value(subsindets(%, ln(exp(anything)), simplify, symbolic));

The above returns 0. Changing f to z-> 1/z, it returns 2*I*Pi.

@Christopher2222 I agree with your policy regarding voting. For almost any legible and legitimate math/Maple Question, if the author has reputation < 11, I give it a vote up. The 11 is the cut-off below which the Question gets the red spam flag.

I'm curious: Is "Maple Companion User" a generic username by which Questions get posted directly from the Maple Companion app? If so, I think it's a bad method: There should be a better way to distinguish users.

I'll say again: The product pull-down list for Questions needs to include Maple Companion.

Of the numerous ways to correct your procedure, this is my favorite:

b:= proc(x::nonnegative)
local n:= trunc(x);
    procname(n):= `if`(n < 2, n, (thisproc(n-1) + thisproc(n-2))/2)
end proc:

 

And multiple matched pairs of (column) vectors can be plotted with 

plot([<X1|Y1>, <X2|Y2>])

There's no limit on how many pairs can be put in the [...].

@nm To upload an animation:

1. Right click on it for the context menu.
2. Export As => GIF
3. Use the green uparrow to to upload it just like you would upload a worksheet.

@Rouben Rostamian  Oh, I forgot to say that the procedure is meant to be run in a separate worksheet, kept in the background.

I don't understand what you mean by "power series of epsilon". I do understand power series of t, power series of x, or perhaps even a joint and power series. 

I think that using a Maple procedure such as below is a lot easier than watching an external file monitor such as fswatch.

CheckForNewData:= proc(
    fn::string, #filename
    {
        start::posint:= FileTools:-ModificationTime(fn),
        sleep::positive:= 2 #seconds
    }
)
    while FileTools:-ModificationTime(fn) <= start do 
        Threads:-Sleep(sleep)
    od;
    return "File touched."
end proc
:

 

@mmcdara "Reading between the lines" of the Question, I suspect that the OP is waiting for new data to appear in a file so that it can be processed by Maple. I don't think that they are actually interested in a file comparison such as is provided by diff or similar OS commands.

@Teep You should add this procedure to my code, right after AssignToClusters:

#Returns the partition of the point indices.
PartitionIntoClusters:= proc(U::Matrix)
local CL:= AssignToClusters(U), k;
    [seq([ListTools:-SearchAll(k,CL)], k= 1..max(CL))]
end proc
:

Running this on the same example as before, I get

CP:= PartitionIntoClusters(U);
[[4, 5, 6, 10, 14, 15, 19, 20], [1, 2, 3, 7, 8, 9, 11, 12, 13, 16, 17, 18],
[21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40]]

You may get a different partition due to randomization of the initial configuration done in my algorithm.

The partitioning of the original matrix of points can then be done by

map2(index, XM, CP);

I should've mentioned this at the time: The continuous red curve in my plot (along the top of the histogram) is not meant to be a proper probability function. It's just a simple connecting of the dots of the discrete function. Sorry if this caused any confusion. 

My guess is that there was a temporary slowdown in the Maplesoft license server. I recall a few times in the past week where startup seemed slow, but the problem seems to have passed. Does the problem persist for you? Here's an experiment: Compare startup times with and without an Internet connection. 

That's a rather banal Post. Were you just testing the MaplePrimes posting system?

First 206 207 208 209 210 211 212 Last Page 208 of 709