acer

32562 Reputation

29 Badges

20 years, 27 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are replies submitted by acer

I'm not sure what it means, to be "first class objects" in Maple. Hardware scalar floats can exist stand-alone. But they'll only come into being (apart from when using their constructor explicitly) within a proc with option hfloat. > kernelopts(version); Maple 11.00, X86 64 LINUX, Feb 16 2007 Build ID 277223 > x:=HFloat(1.2); x := 1.19999999999999996 > dismantle(%); HFLOAT(2): 1.2 Also, see ?option_hfloat acer
I'm not sure what it means, to be "first class objects" in Maple. Hardware scalar floats can exist stand-alone. But they'll only come into being (apart from when using their constructor explicitly) within a proc with option hfloat. > kernelopts(version); Maple 11.00, X86 64 LINUX, Feb 16 2007 Build ID 277223 > x:=HFloat(1.2); x := 1.19999999999999996 > dismantle(%); HFLOAT(2): 1.2 Also, see ?option_hfloat acer
The mixture sin-Pi isn't very useful. Does one apply it, as an operator, or evaluate it at a point, or...? > k := sin-Pi; k := sin - Pi > k(1.1); 0.8912073601 - Pi(1.1) > eval(k(x),x=1.1); 0.8912073601 - Pi(1.1) How would you plot it? Distinguishing between sin-1/2 and sin-sqrt(2) seems inconsistent to me. acer
R[3] accesses the 3rd entry of Vector R. More abstractly, R[i] accesses the ith entry, given a positive integer i less than the upper index bound (here, 10^6). You can also extract sub-Vectors, eg. R[3..11] . If Vector R has a million entries, then how would you want to look at them? ArrayTools[AddAlongDimension](R) should sum all the entries in Vector R. acer
R[3] accesses the 3rd entry of Vector R. More abstractly, R[i] accesses the ith entry, given a positive integer i less than the upper index bound (here, 10^6). You can also extract sub-Vectors, eg. R[3..11] . If Vector R has a million entries, then how would you want to look at them? ArrayTools[AddAlongDimension](R) should sum all the entries in Vector R. acer
I used a Vector, rather than a list, to store the final result. And I gave it a hardware datatype, just to try to keep allocation down. I don't think that I used lists at all, trying instead to use add() to sum the 12 values (at each iteration) without forming the sequences explicitly. acer
I used a Vector, rather than a list, to store the final result. And I gave it a hardware datatype, just to try to keep allocation down. I don't think that I used lists at all, trying instead to use add() to sum the 12 values (at each iteration) without forming the sequences explicitly. acer
Running all the built-in functions with no arguments should be done as part of basic testing and quality assurance. acer
> kernelopts(version); Maple 11.00, X86 64 LINUX, Feb 16 2007 Build ID 277223 > `^`(f); Execution stopped: Stack limit reached. That's 8 keystrokes, counting the return. acer
A post by DJKeenan contains, `^`(`$`(x,n)); Maple 10.2 gave "Error, invalid input: ^ expects 2 arguments, but received 1" for that input. But Maple 11.00 (and 11.01 it seems) crash immediately with "Execution stopped: Stack limit reached". That's 15 keystrokes, including the return. A moderately interesting variation is this, which cuts out two keystrokes, `^`($(x, n)); acer
The Matrix and Vector constructors will generally attempt to "flatten" the data, for most input forms. But someone might actually want to create a Vector of rtable objects, with no flattening occuring during construction. Someone else might want or expect flattening, and be caught unawares when it was not done, and for that user an error raised may be helpful. So, some balance is needed, to get all these effects. Personally I don't find the current behaviour of Vector() to be so bad, since the square-brackets are also used to delimit data (separating rows, say) for the Matrix constructor. Having written all that, what is the corresponding format for entering an unflattened Matrix of other rtables? When I tried a similar thing, with Matrix(), I obtained a Matrix whose entries were actual lists. Maybe there's a way, that I did not see. acer
Hi Roman, Is enabling system/ssystem calls only necessary to install it? Or is it required in order to run the package (and if so, why, may I ask)? What's the story behind the commented-out free_memory() call in the ModuleUnload of module sdmp? Does the compiled shared object do its own memory management, and if so why, and what would happen if it couldn't free on restart? Have you considered distributing the mpl sources in a .mla file, and the .mw as an embedded help-page within a .hdb file? Have you considered using InstallerBuilder from Maple to create a self-installing .mla (container, which unpacks the various files)? How about putting the materials under a subdirectory of /toolbox/ , so that .mla/.hdb and bin. get found automagically by the maple kernel? acer
Hi Robert, This is equivalent to what I was did, I believe, although I assumed that the poster would see the rationale for himself. There are 12 equations in 2*4*4 unknowns (real and imaginary parts). And only when the 12x32 matrix has rank=12 will one know that the 12 rows (or 12 4x4 complex matrices) are linearly independent. What I had as the bigM Matrix looks equivalent to the Matrix G in what you posted (though possibly with columns out of order). One can form G without having to form eqs, though of course `solve` would use the latter. acer
Can you make a 12x32 Matrix, where the entries of each row are the real and imaginary components of the entries of one of the 4x4's? with(LinearAlgebra): for i from 1 to 12 do M[i] := LinearAlgebra:-RandomMatrix(4)+I*LinearAlgebra:-RandomMatrix(4); od: for i from 1 to 12 do m[i]:=ArrayTools:-Alias(M[i],[16]); od: for i from 1 to 12 do n[i]:=Vector[row](32,[Vector(16,ii->Re(\ m[i][ii])),Vector(16,ii->Im(m[i][ii]))]); od: bigM := Matrix(12,32,(i,j)->n[i][j]): Rank(bigM); m[7]:=(2*I)*m[1]-m[3]; for i from 1 to 12 do n[i]:=Vector[row](32,[Vector(16,ii->Re\ (m[i][ii])),Vector(16,ii->Im(m[i][ii]))]); od: bigM := Matrix(12,32,(i,j)->n[i][j]): Rank(bigM); m[7]:=(2)*m[1]-m[3]; for i from 1 to 12 do n[i]:=Vector[row](32,[Vector(16,ii->Re\ (m[i][ii])),Vector(16,ii->Im(m[i][ii]))]); od: bigM := Matrix(12,32,(i,j)->n[i][j]): Rank(bigM); I wonder if there's a super slick way to do this using LinearAlgebra[Generic] from Maple 11. acer
Given that m and n are integers, then is it only the cases where m=n that the result is not zero? And when m=n<>0, then is the result Pi? If so (and check that I'm not wrong about that), then Maple 11 gives me, > _EnvAllSolutions:=true: > int( cos(m*x) * cos(n*x) , x = 0..2*Pi) assuming n=m, n::integer, m::integer: > lprint(%); piecewise(m+n = 0,2*Pi,Pi) That looks close. The subcase m+n=0 combined with m=n implies that m=n=0, so 2*Pi is good there. But I couldn't get maple to simplify to that. Interestingly, I got it slightly differently below using assume instead of assuming, > _EnvAllSolutions:=true: > assume(m::integer,n::integer); > int( cos(m*x) * cos(n*x) , x = 0..2*Pi ): > lprint(%); piecewise(m-n = 0,Pi,0)+piecewise(m+n = 0,Pi,0) Using other incantations of assume(), I got a result similar to the first one above, using assuming. acer
First 571 572 573 574 575 576 577 Last Page 573 of 595