Carl Love

Carl Love

28035 Reputation

25 Badges

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

MaplePrimes Activity


These are replies submitted by Carl Love

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?

@JAMET A related curiousity is that it was recently (2015) proved (by Samir Siksek) that "Every integer greater 454 is the sum of at most seven positive cubes." But, they're not necessarily distinct.

@Teep Let's consider the example of dividing the 40 points in matrix XM into 3 clusters. Then the following commands will partition XM into 3 matrices, one for each cluster:

(C,U):= FuzzyCMeans(XM, clusters= 3):
CL:= AssignToClusters(U):
(C1,C2,C3):= seq(XM[[ListTools:-SearchAll(k,CL)]], k= 1..3); 

In other words, if cluster label k appears in the ith position in list CL, then the ith row of XM is a point in cluster number k.

Hmm, I don't like this behavior. It shows simplify and expand ignoring the inertness! The only command that should be allowed to ignore inertness is value.

Also try `%%sum` to see another curiosity.

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