pyr0rrzzz

145 Reputation

2 Badges

11 years, 236 days

MaplePrimes Activity


These are answers submitted by pyr0rrzzz

Thank you.

Ah, I should have known that what I want is called a histogram, but I would have never come up with that bincount trick which enables it to be plotted the way I want in the first place.

Thank you again, this is very helpful.

Eliminating the values that have a 0 in the 2nd column actually helps but I want them to be plotted, too.

The last approach looks good but it's not quite what I wanted (I want to count how often each possible difference occurs and plot this). But since the plot works here I guess it can be done in a similar way to this.

Of course the two-dimensional thing was nonsense. It's an one-dimensional array containing two-dimensional vectors ;)

After initialization I want the array to contain the vectors <0,0>, <1,0>, <2,0> , ... <t,0>. I tried something like your example but it doesn't work: Array(0 .. t, 1 .. 2, (a) -> <a,0>)

Thanks, I already had figured it out but my code turned out way longer:

> g := PositionVector([s, s^3]);
> V := ConvertVector(g+RadiusOfCurvature(g)*PrincipalNormal(g, s, normalized)+Vector([RadiusOfCurvature(g)*cos(t), RadiusOfCurvature(g)*sin(t)]), position);
> with(plots); display([PlotPositionVector(g, s = -2 .. 2, curveoptions = [color = red, thickness = 2, numpoints = 1000]), seq(PlotPositionVector(eval(V, [s = i]), t = 0 .. 2*Pi, curveoptions = [color = blue, thickness = 1, numpoints = 1000]), i = {-1, 1, -1/2, -1/24, 1/2, 1/24})], scaling = constrained);



Whoops, of course there should be a different variable :

> g := PositionVector([s, s^3]);
> V := VectorCalculus[`+`](VectorCalculus[`+`](g, VectorCalculus[`*`](PrincipalNormal(g, s, normalized), RadiusOfCurvature(g))), PositionVector([VectorCalculus[`*`](RadiusOfCurvature(g), cos(t)), VectorCalculus[`*`](RadiusOfCurvature(g), sin(t))]));

Hooray, I think I understood the whole thing now. :)

Turns out, the only thing I "forgot" was to use map(rationalize,...) which is why the result looked terrible.

The matrix I posted above actually is extended, because there where terms in x^1*y^0 and x^0*y^1 and x^0*y^0 in the original equation. (Is there a command to get this extended matrix automatically?)

Thanks a lot.

I tried it but I only get a terrible matrix that isn't even diagonalized. :(

The matrix should be A := [[-1,3/2,-5/2],[3/2,3,0],[-5/2,0,-1]].

So I computed the following:

Lambda, X := Eigenvectors(A);
x := Column(X, 1);
y := Column(X, 2);
z := Column(X, 3);
S := Matrix([x,y,z])
D := Multiply(MatrixInverse(S),Multiply(A,S))

I also don't really see the point of doing so.
This seems to be another useful command to know, so thanks to both of you.
Thank you.

Thanks!

Thank you, andmap was just what I was looking for.

^ That sounds good, I'm going to try it. But why do I only need to check the property for all the coprimes smaller than n? I mean, there is most likely an infinite number of coprimes greater than n, too.

EDIT: I came up with the following code. I bet it's a mess:

 

Thank you, now I just need to understand how I could've found this myself.

Page 1 of 1