Carl Love

Carl Love

28115 Reputation

25 Badges

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

MaplePrimes Activity


These are replies submitted by Carl Love

@emma hassan In your colleague's code, A is the band matrix. In your code, A is a vector, and is the band matrix. You need to multiply either

(row vector) . matrix = (new row vector)

or

matrix . (column vector) = (new column vector)

And the left-right order of those products matters! To switch a row vector to a column vector, use Transpose, or a shortcut is to use %T as an exponent.

@Preben Alsholm Thank you, Preben, for the memory jog. I've updated the main Answer to incorporate your suggestion.

@Preben Alsholm Thank you, Preben, for the memory jog. I've updated the main Answer to incorporate your suggestion.

@vshyam Wikipedia and crowd-sourcing are great.

Are you trying some special numerical integration that Maple can't otherwise handle? Or are you just studying the method?

@vshyam Wikipedia and crowd-sourcing are great.

Are you trying some special numerical integration that Maple can't otherwise handle? Or are you just studying the method?

Note that Maple does allow for an empty Matrix, Matrix(0,0) or simply Matrix(), whose determinant is 1. So you don't need to treat n = 0 as a separate case.

Note that Maple does allow for an empty Matrix, Matrix(0,0) or simply Matrix(), whose determinant is 1. So you don't need to treat n = 0 as a separate case.

@williamov Use command add to do sums with specific numeric arguments.

add(XXXX, n= 0..3);

But like I said before, I DID NOT INTEND FOR YOU TO USE DetAn IN A SUMMATION. If it could be done in Maple, I would've done it in the first place. I intended for you to do this:

seq(DetAn(k), k= 0..9);

 

@williamov Use command add to do sums with specific numeric arguments.

add(XXXX, n= 0..3);

But like I said before, I DID NOT INTEND FOR YOU TO USE DetAn IN A SUMMATION. If it could be done in Maple, I would've done it in the first place. I intended for you to do this:

seq(DetAn(k), k= 0..9);

 

@williamov I did not intend for the procedure DetAn to be used in a summation! I wrote it so that you could look at the determinants. It can only be called with specified integer arguments. You cannot "convert" a symbol into an integer just by using a convert command!

@williamov I did not intend for the procedure DetAn to be used in a summation! I wrote it so that you could look at the determinants. It can only be called with specified integer arguments. You cannot "convert" a symbol into an integer just by using a convert command!

@Alejandro Jakubi Thank you for bringing this shocking and sad situation to my attention. Unfortunately, I am seeing more and longer sections of code written in the 2d input and it is more difficult to read and to debug.

@Alejandro Jakubi Thank you for bringing this shocking and sad situation to my attention. Unfortunately, I am seeing more and longer sections of code written in the 2d input and it is more difficult to read and to debug.

@casperyc Sorry that my little joke about the real reals was not understood. What I meant was that you should generate random floating-point numbers using the full value of Digits that you're working with. That way you're sampling from an essentially infinite set of numbers, rather than the 601 that you get from rand(-300..300)/100. You can make a generator procedure for a list of 4 floats in -3..3 like this:

myRand:= RandomTools:-Generate(
     list(float(range= -3..3, digits= 15), 4),
     makeproc
):
myRand();

[-1.96641365834694, 0.97863816019558, 1.64810779924759, 2.15154588529516]

You are correct that the (true) rank of a numeric matrix cannot be greater than the rank of the symbolic matrix from which it is derived. Any apparent counter-example must be due to an accumulation of round-off errors in the numeric rank algorithm. LinearAlgebra:-Rank uses a singular value decomposition for float-point matrices. If you find another example of such a Matrix, I'd be very interested in looking at its singular values.

@casperyc Sorry that my little joke about the real reals was not understood. What I meant was that you should generate random floating-point numbers using the full value of Digits that you're working with. That way you're sampling from an essentially infinite set of numbers, rather than the 601 that you get from rand(-300..300)/100. You can make a generator procedure for a list of 4 floats in -3..3 like this:

myRand:= RandomTools:-Generate(
     list(float(range= -3..3, digits= 15), 4),
     makeproc
):
myRand();

[-1.96641365834694, 0.97863816019558, 1.64810779924759, 2.15154588529516]

You are correct that the (true) rank of a numeric matrix cannot be greater than the rank of the symbolic matrix from which it is derived. Any apparent counter-example must be due to an accumulation of round-off errors in the numeric rank algorithm. LinearAlgebra:-Rank uses a singular value decomposition for float-point matrices. If you find another example of such a Matrix, I'd be very interested in looking at its singular values.

First 658 659 660 661 662 663 664 Last Page 660 of 710