das_1404

73 Reputation

4 Badges

13 years, 344 days

MaplePrimes Activity


These are questions asked by das_1404

The sample code below generates a message: Error, too many levels of recursion.  It appears to be in the permute function, and seems to be related to variable names I have in my program.  The "error" is intermittent - it appears to work for some but not others eg  aaa:=permute([a,e,i,l,z], mm); does not work but aaa:=permute([e,e,k,n,s], mm); does.  I suspect that it is not liking some variable names in my program.  Any hints or suggestions much appreciated.

Hi Short question version: ss := ["abcd", " efg", " hijk", " lm_r", " stuv_k"] How can this be converted to: ss := [abcd, efg, hijk, lm_r, stuv_k] (ie just remove the quotation marks.) Thanks David Longer version: This was meant to be a reply to a previous question posted about 2 days ago, but I have failed to find it. (Sadly I have failed in my attempt to answer his question anyway.) No doubt my lack of being able to successfully use the sort features - are they working properly? (They just seemed to be in a different random order?) restart: ss:="abcd # efg # hijk, lm_r, stuv_k":
Hi Am trying to tidy up a printout of two columns in M version 7, such that the second column is lined up. Using the tab character \t in the printf statement does not seem to work - it just shifts a fixed number of spces, rather than go to a tab stop position. The following Maple code is very klutzy: however its redeeming feature is that it does work. Sample Maple code: #Create a long string of spaces (26 spaces between " ") aspac:=CharacterMap( "ABCDEFGHIJKLMNOPQRSTUVWXYZ", " ", cat(a,a) ); #NB a is the first 'word' - see output below #spac is a string of spaces to ensure alignment
Hi Please see Spiderflygrid2.mws A spider is on the floor of a cubical room of side 1. Its position is given. Where must the fly position itself to be as far as possible from the spider? My attempt minimizes the square of the twelve possible distances. This is m. m:=min(seq(cd[i], i=1..12)); Partial derivatives of m are found with respect to xf (the x coord of the fly) eq1:=diff(m,xf); ... & with respect to yf (the y coord of the fly) eq2:=diff(m,yf); These two equations are then solved simultaneously. solve({eq1,eq2}); Maple gives an error message - is this due to the discontinuities in the expression m? Or (more likely) a fault in my Maple code?
Hi The code below prints out (x-1)*(x-2) with an asterisk for the multiplication symbol. I would like it to print out z without this sign. Any ideas please on how to do this. Maple input restart: interface(prettyprint=3): printlevel:=1: a:=1:b:=-3:c:=2: y:=a*x^2+b*x+c: z:=factor(y); printf("%A\n",z); Maple output z := (x - 1) (x - 2) (x-1)*(x-2)
1 2 Page 1 of 2