Carl Love

Carl Love

28070 Reputation

25 Badges

13 years, 28 days
Himself
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are replies submitted by Carl Love

Yet there are the symbolic options to simplify, sqrt, and combine(..., power). One should be able to achieve what the Asker wants under those options, throwing caution to the wind, so to speak. I can't understand why the following does not work:

1/sqrt(x)*1/sqrt(y);
combine(%, power, symbolic);

But the applyrule seems to work easily.

If we add a prettyprinting procedure to Markiyan's code, we can get output that looks more like the original formula without altering any of the computational aspects:

`print/binomial`:= (n,k)-> 'C'[n]^k:

theo(a1,a2,N1,N2);

If we add a prettyprinting procedure to Markiyan's code, we can get output that looks more like the original formula without altering any of the computational aspects:

`print/binomial`:= (n,k)-> 'C'[n]^k:

theo(a1,a2,N1,N2);

Since expressions are assumed to be equated to 0 by solve, and since the solution variables are assumed to be all the indeterminates, you could simply do

solve(map(coeffs, {f,g}, [x,y]));

Since expressions are assumed to be equated to 0 by solve, and since the solution variables are assumed to be all the indeterminates, you could simply do

solve(map(coeffs, {f,g}, [x,y]));

@casperyc Actually, having just run both NullSpace(GaussianElimination(M)) and NullSpace(M), I see no benefit to the preliminary step.

@casperyc Actually, having just run both NullSpace(GaussianElimination(M)) and NullSpace(M), I see no benefit to the preliminary step.

@PatrickT wrote:

The use of thisproc inside subsindets is very neat.

At first it seems recursive, but essentially it is not: The recursive call can only ever proceed one step. You could just as well write the procedure like below. This is probably a little faster, and is how I would've written it were I not working from your code. This also avoids the redundancy of rebuilding the format for each float.

Round3:= proc(x, n::nonnegint:= 1)
local format:= cat("%.", n, "f");
     subsindets(x, float, f-> parse(sprintf(format, f)))
end proc;

@PatrickT wrote:

The use of thisproc inside subsindets is very neat.

At first it seems recursive, but essentially it is not: The recursive call can only ever proceed one step. You could just as well write the procedure like below. This is probably a little faster, and is how I would've written it were I not working from your code. This also avoids the redundancy of rebuilding the format for each float.

Round3:= proc(x, n::nonnegint:= 1)
local format:= cat("%.", n, "f");
     subsindets(x, float, f-> parse(sprintf(format, f)))
end proc;

@Markiyan Hirnyk I (or my guess at least) stand corrected. You should make it an Answer so that I can vote up. I wonder why the intermediate step of GaussianElimination makes a difference. I would think that NullSpace would do that anyway.

@Markiyan Hirnyk I (or my guess at least) stand corrected. You should make it an Answer so that I can vote up. I wonder why the intermediate step of GaussianElimination makes a difference. I would think that NullSpace would do that anyway.

I think that "somewhat complicated" is an understatement. Your C5 is a dense 6 x 12 Matrix of "somewhat dense" polynomials in 12 variables. I guess (just guessing here) that this is well beyond the capability of any computer or CAS currently in existence.

I got an error trying to load your C4. The code to generate the matrices seems missing.

Briefly, this issue in handled by the output= permutation option to sort in Maple 17. I see from your header that you are using Maple 15. In that case you can do something like this:

Original list:
L:= [2,4,5,0,-1];
                        [2, 4, 5, 0, -1]
Pair each element with its index number:
L1:= [seq]([L[i],i], i= 1..nops(L));
           [[2, 1], [4, 2], [5, 3], [0, 4], [-1, 5]]
sort(L1);
           [[-1, 5], [0, 4], [2, 1], [4, 2], [5, 3]]

Briefly, this issue in handled by the output= permutation option to sort in Maple 17. I see from your header that you are using Maple 15. In that case you can do something like this:

Original list:
L:= [2,4,5,0,-1];
                        [2, 4, 5, 0, -1]
Pair each element with its index number:
L1:= [seq]([L[i],i], i= 1..nops(L));
           [[2, 1], [4, 2], [5, 3], [0, 4], [-1, 5]]
sort(L1);
           [[-1, 5], [0, 4], [2, 1], [4, 2], [5, 3]]

@somayeh Please repost this as a new Question. Also, show a little of the code for how you obtained the vector before you sorted it. It looks like it may actually be a list rather than a Vector.

First 629 630 631 632 633 634 635 Last Page 631 of 709