Joe Riel

9530 Reputation

23 Badges

20 years, 26 days

MaplePrimes Activity


These are answers submitted by Joe Riel

To print the list vertically, you could convert to a Vector and do

printf("%{c\n}a\n", <xyz>);       
dx = x*y-1/3*y+1/3*z
dy = -.1e-1*x
dz = 1/10*z

See ?rtable_printf

 

There is nothing wrong with the first result.  The first call to sum computes an indefinite summation, which is analogous to an indefinite integral. As such, it is correct up to a constant. See ?sum,details.

Are you sure v is a function of x and not of p?

I'm not sure what you mean by "index in the name".  Could you give an example?

Change ?sum to ?add and remove the forward-quotes from A.  The sum procedure is intended for indefinite summation. You can also delete the two statements, i::nonnegint; and j::nonnegint.  They have no effect on the operation. For this procedure to work, the LinearAlgebra package must have been "withed".  A better design is to add the statement

uses LinearAlgebra;

at the start of the body of the procedure.  See ?uses. Actually, since you use but one procedure from the LinearAlgebra package, it is easy enough to call ColumnDimension with LinearAlgebra:-ColumnDimension.  An alternative is to use the new command, ?upperbound.  Do

dimA := upperbound(A,2);

What do you mean by a "map"?  If you mean a single directory, then use ?FileTools[ListDirectory], with the 'returnonly' option; for example

files := FileTools:-ListDirectory("mydir", 'returnonly' = "*.jpg");

If you need to recurse into directories, let me know, I have routines for doing that.

solve needs to know the variables to solve for.  A nice way to do this, given that you've already assumed the knowns as constants (which doesn't otherwise do anything useful here) is the following:

vars := remove(hasassumptions, indets(sys));
solve(sys, vars);

Those are really old worksheets. Maple used to distribute an executable, updtsrc, for updating old worksheets to a newer format, however, that hasn't been needed since Maple 6, so is no longer distributed (I believe).

The equation of the "force" is incomplete.  What is R?  What is UOXB? Probably you wrote a vector using angle-bracket notation, but the html doesn't display that.

You want to find x such that it is a member of the kernel, or nullspace, of A.  See ?LinearAlgebra[NullSpace]. It returns a set of vectors that correspond to a basis for the kernel.  Any linear combination of the vectors in the kernel satisfy the equation (A.x=0).

The error is occurring in TrapRule, which isn't shown here.

There are various minor issues with the above code. The type-checking conditionals aren't quite correct in that they won't raise an error if m or n is not numeric. Also, ERROR is deprecated in Maple, use ?error. The while-statement works, but really should be an if-statement.

If there is no requirement for the precise error message, you may use parameter type declarations for part of the error checking:

RombInt := proc(f, a, b, m::nonnegint, n::nonnegint)
...
end proc:

To issue an error when m > n, add the following conditional at the start of the procedure body

if m > n then
   error "parameter m must be less than or equal to n";
end if;

See the help page for ?error.

 

Use the "Z" modifier.  For example,

printf("%5.3Zf\n", 5+3*I);
5.000+3.000I

See ?printf

It works for me using Debian (Squeeze, stable) with Maple 15. Are you sure the browser is configured properly in Maple?  To select a browser in the Standard GUI, click Tools --> Options --> General --> Browser and select the browser.  To test it, try doing

error "testing";

The resulting error message should be a hyperlink. Clicking on it should cause the browser to open to a Maplesoft online help page. Clicking on the link doesn't necessarily give the browser the focus, you may have to manually change to the browser.

This is a round-off issue.  You might first try modifying the assignments to L and v so that they are exact fractions, rather than floats. Then call fsolve with ?Digits := 50 or thereabouts.

First 46 47 48 49 50 51 52 Last Page 48 of 114