sursumCorda

1002 Reputation

13 Badges

1 years, 231 days

MaplePrimes Activity


These are answers submitted by sursumCorda

@lcz How about g[1].txt? But for some unexplained reason, certain data cannot be read: 

restart;

currentdir(homedir):

g := GraphTheory:-ImportGraph("Desktop\\g[1].gml", graphlet)

g := `Graph 1: an undirected unweighted graph with 15 vertices and 30 edge(s)`

(1)

GraphTheory:-DrawGraph(g)

%?

 

%?

Download test_g.mws

You need 

Export("E:\\M.txt", String(M)); # not the same

or

Export("E:/M.csv", M):
Export("E:\\M.txt", Import("E:/M.csv", format = "Text"));
fremove("E:/M.csv");

Note that .csv is a text-based format, so you can simply rename M.csv to M.txt (using FileTools[Rename]) in fact.

How about PCA_1.mw?

simplify(solve({(BD + CD)^2 = AB^2 + AC^2 - 2*AB*AC*cos(Pi/9 + (4*Pi)/9), BD/CD = 4/3, AB*sin(Pi/9)/BD = AC*sin((4*Pi)/9)/CD, AB^2*CD + AC^2*BD = (BD + CD)*(4^2 + BD*CD), (AB, AC, BD, CD, AB + AC - (BD + CD), AC + (BD + CD) - AB, AB + (BD + CD) - AC) >~ 0}));

 gives AB = 28/3, but 

solve({BD^2 = AB^2 + 4^2 - 2*AB*4*cos(Pi/9), CD^2 = AC^2 + 4^2 - 2*AC*4*cos((4*Pi)/9), (BD + CD)^2 = AB^2 + AC^2 - 2*AB*AC*cos(Pi/9 + (4*Pi)/9), BD/CD = 4/3, (AB, AC, BD, CD, AB + AC - (BD + CD), AC + (BD + CD) - AB, AB + (BD + CD) - AC) >~ 0});

gives an error ...

1 2 3 4 5 Page 5 of 5