Carl Love

Carl Love

28045 Reputation

25 Badges

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

MaplePrimes Activity


These are replies submitted by Carl Love

@Joe Riel I didn't mean to imply that it was the same string. I'm just saying that é is a much-more-convenient way to enter e with an (acute) accent directly from the keyboard, rather than creating the string externally and copy-and-pasting or programming the bit-level manipulations of Unicode.

@lplex Maple understands most (perhaps all?) HTML &-codes directly typed into strings. So:

"décembre";

So copy-and-paste is not needed. This is much more user-friendly than Unicode (for direct keyboard input), even if it takes a few more bytes of memory. All such codes begin with &, are followed by some descriptive letters, and end with ;.

@Samir Khan You can easily directly compute the Katz centrality as below. This can be done in the worksheet anyplace after the graph G has been defined.


GT:= GraphTheory:  LA:= LinearAlgebra:
A:= Matrix(
    GT:-AdjacencyMatrix(G), shape= symmetric, datatype= hfloat
):
ME:= max(abs~(LA:-Eigenvalues(A)));
n:= upperbound(A,1):
CF:= 1.1: #Convergence factor: Can be any number > 1.
I__n:= Matrix(n, shape= identity, datatype= hfloat):
Ones:= Vector(n, 1, datatype= hfloat):
katz_centrality:= LA:-LinearSolve(I__n - A/CF/ME, Ones) -~ 1:

Then proceed with the sorting and plotting exactly as before.

@Adam Ledger CygWin is not a Linux virtual machine, it's just a Linux-like command-window environment. You can still run all your Windows programs from it, including Maple.

@Adam Ledger Yes, I was going to suggest that, although I don't know the precise details.

@Samir Khan  In the workbook attached to the section about centrality measures of graphs, you've misused the attenuation factor (alpha), which is the second parameter of GraphTheory:-KatzCentrality. You've used alpha=0.1, but this factor (for the results to be meaningful) must be smaller than the reciprocal of the eigenvalue of the adjacency matrix (A) of largest magnitude. In this case, that means it should be smaller than about 1/41. The reason for this is that the Katz measure is based on a matrix infinite geometric series with ratio alpha*A. This series diverges if alpha is larger than as stated above. The reason that KatzCentraility doesn't catch this is because it sums the series with the familiar geometric series formula: ((I-alpha*A^+)^(-1) - I), but this summation formula isn't valid for alpha larger than as stated above.

Actually, the bar chart produced for the Katz Centrality has a severe discontinuity for some alpha in 1/589.9390449..1/589.9390448, and the results seem meaningless to me for larger alpha. Since the reciprocal of the maximum eigenvalue of the weight matrix (not the adjacency matrix A) is in this interval, it must be that KatzCentraility is using rather than A. (I'd like to see a reference that backs up the validity of this.) If it's correct to use W, then certainly it's utterly meaningless to use alpha > 1/589.... 

@TianyuCheng The arrows, just like the curves, are generated in cartesian coordiantes. The transformation into polar coordinates causes some distortion.

@Adam Ledger Get CygWin on your Windows computers. It's a free, downloadable Linux-like "shell" command-window environment with all the standard Linux commands and text-processing tools. 

@Kitonum The polynomial is degree 8 wrt each of x and (and biquartic in y, thus symbolically solvable, though I didn't make use of that). So, splitting wrt x or gives 8 functions of y or x, respectively. Conveniently it turns out that in each case 4 of these functions are real-valued. The below plots show these 8 real-valued branches color-coded, so you can see where each connected component of the original plot comes from.

restart:
p:= add(seq((lambda/3)^k/k!, k= 0..4) *~ [1$3, -1/2, 1]):
pxy:= evalc(abs(eval(p, lambda= x+I*y))^2-1):
(d1,d2):= degree(pxy, x), degree(pxy, y):
plot(
    [seq([RootOf(pxy, x, index= k), y, y= -12..12], k= 1..d1)],
    color= [seq(COLOR(HUE, .85*(k-1)/(d1-1)), k= 1..d1)],
    thickness= 3
);
plot(
    [seq([x, RootOf(pxy, y, index= k), x= -6..7], k= 1..d2)],
    color= [seq(COLOR(HUE, .85*(k-1)/(d2-1)), k= 1..d2)],
    thickness= 3
);

@BarKop I just fully updated my Answer below to include summarize and programmatic extraction of r-squared and adjusted r-squared from the solutionmodule. Also, I added several more formatting tricks ("bells & whistles") to the plot.

Although I have no issue with Acer's final results and plot---they are equivalent to mine---I think that the huge ratio of singular values (exacerbated by lowering the svdtolerance) leads to the hard-to-believe t-values and p-values shown in his summarize chart.

I redid the worksheet above using a more-intuitive method to compute the ellipse fit's residuals so that they'd be directly comparable to those for the circle fit.

@rameen hamood I just put a Reply and worksheet below my Answer. Try it. But I can't tell what, if anything at all, you did wrong. It looks right to me. My first guess is that something messes up when you take variable names from palettes instead of typing them.

@Carl Love I can't tell what, if anything, you did wrong. But try the following. It's essentially the same thing as your code, in plain text:

restart:
assume(c > 0);
f:= (8*sin(x)+11*cos(x))*exp((-5/2)*c*x);
ans1:= int(f, x= 0..infinity);
limit(c*ans1, c= infinity);
      22/5


 

restart:

assume(c > 0);

f:= (8*sin(x)+11*cos(x))*exp((-5/2)*c*x);

(8*sin(x)+11*cos(x))*exp(-(5/2)*c*x)

ans1:= int(f, x= 0..infinity);

2*(55*c+16)/(25*c^2+4)

limit(c*ans1, c= infinity);

22/5

 


 

Download Rameen.mw

@tomleslie I'm nearly certain that the OP is referring to a Maple internal format file generated by the save command. A user-specified file extension of ".m" causes it to be in internal format. Still, I believe that they are text files (although not human readable), so changing the file extension to .txt would probably work, as long as one remembers to change it back to .m after downloading it. Since unzipping a file automatically restores its original name and extension, I thought that that'd be the easiest option.

@Kitonum I fitted a circle to the roots in the upper right corner. Visually, it was a perfect fit. But, plotting the residuals (although small ~ 1e-3) showed a nearly perfect sinusoidal pattern of two periods. So I guessed that an ellipse would be a better fit. The ellipses' residuals are over 400 times smaller, but still have a nearly perfect sinusoidal pattern, this time with 3 periods.

Maple Worksheet - Error
Failed to load the worksheet /maplenet/convert/Ellipse.mw .

Download Ellipse.mw

 

The worksheet won't display inline for unknown reasons, but you should still be able to download it.

First 214 215 216 217 218 219 220 Last Page 216 of 709