8442 === Subject: Re: I cant find FBoxW Darn it, they found it :) I thought that I had it well hidden! > ROM entries (49 series) > ----------------------- > #26080 =FBoxW > #255D3 =FBoxG1 > #255D8 =FBoxG2 > #255DD =FBoxB > Note: =FBoxW aka =GROB!ZERO Ah, now that's the first answer that has a solid ringing sound to it :) \The course our city runs is the same towards men and money. She has true and worthy sons. She has fine new gold and ancient silver, coins untouched with alloys, each well minted, tested each and ringing clear. Yet we never use them! Others pass from hand to hand, sorry brass just struck last week and branded with a wretched brand. So with men we know for upright, blameless lives and noble names. These we spurn for men of brass.\ [Aristophanes, \The Frogs\ 405 B.C.] . === Subject: Re: I cant find FBoxW posting-account=HQcyKwkAAAAfyVM-3k2cuaNBENqZAwPy Gecko/2009011913 Firefox/3.0.6,gzip(gfe),gzip(gfe) > Darn it, they found it :) I thought that I had it well hidden! Hard work for me :-( - Gaak - === Subject: Hp 9g posting-account=0peYQwoAAAByd_dPTcsGqf6J1rk8Mp20 Gecko/2009011913 Firefox/3.0.6,gzip(gfe),gzip(gfe) Excuse me, my calculator is not the 48, but i cant turn on this. and my warranty are finished. Somebody know how i can to solve this fail? === Subject: Re: Hp 9g posting-account=tcgJPQoAAABxYymug63nNNjPqNtEpLIz rv:1.9.0.6) Gecko/2009011912 Firefox/3.0.6,gzip(gfe),gzip(gfe) > Excuse me, my calculator is not the 48, but i cant turn on this. and > my warranty are finished. Somebody know how i can to solve this fail? Maybe you need to do a hard reset. See http://h10025.www1.hp.com/ewfrf/wc/document?docname=bpia5282&cc=us&lc=en&dlc\ =en&product=240096 where it says If the calculator locks up, and pressing keys has no effect, then perform a hard reset to unlock the calculator and return all settings to their default values: Press EXP\ and DEL at the same time. If this doesn't work, perhaps there is a manual hard reset. Typically, there is a small hole in the calculator, possibly under one of the rubber feet. Poke a stiff piece of wire into the hole and it may depress the manual-reset switch. But I there is probably no such switch on the 9g. The other thing which might help is to remove the batteries and wait a while (perhaps one day) before putting them back in. This should allow it to forget any bad thoughts it was having ... === Subject: Re: HP48 ROM source code > Obviously ROM source are in circulation :) > So my question is: > Somebody would have the HP48 ROM source code (S and G) > and could provide them? Software developers (who paid HP to use it, and probably signed legal agreements) and insiders. A lot of it remains unchanged (or almost so) in the 49/50 series. Spreading it around might not please HP. However, anyone can use \Jazz\ and any other \ROM explorers,\ even with emulators and authorized ROMS, to see the actual instructions, albeit absent any comments. [r->] [OFF] === Subject: Re: HP48 ROM source code > > However, anyone can use \Jazz\ and any other > \ROM explorers,\ even with emulators and authorized ROMS, > to see the actual instructions, albeit absent any comments. > > [r->] [OFF] Ok, thank's for your answer John :) I'm ok with you, I've already \reverse-engineered\ about 550ko of ROM source code 6 years ago, but without any comments, many details stay very obscur for me ;) I'm not a 'high level' programmer, only occasional, and to have the original source code is really an perfect exemple to learn to write powerful, clean and beautiful code on HP48 ;) Without speaking about the pleasure of understanding of the HP internal's :D That's my hobby ! lol === Subject: Re: HP 50g keyboard layout posting-account=KxEIGwoAAAALMxy6hykxLK1wPdiyuNkK Gecko/2009011913 Firefox/3.0.6,gzip(gfe),gzip(gfe) > > > manuals need to be rewritten from a newbie point of view > > But manuals are no longer read :) > > Or as one might imagine Marshall McLuhan saying: > \The graphical user interface is now the entire message\ :) While I appreciate John's humor here, I don't think the case applies. When the HP 50g comes out the shrink wrap, there is no GUI help, just a manual and a CD. The manual is full of typos and nearly impossible to understand for a new user like myself (I hadn't seen a new HP calculator since I bought a 41CV around 1982). I'd expect the beginning of the manual to explain how to add, subtract, multiply and divide, but instead it plunges you into 50(!) pages of modes, number formats, how to enter hideously complex equations, angle measurements, coordinate systems, CAS settings, display modes, stack properties, equation editor properties, calculator objects, stack expressions, equation editors, variable names, organizations, directory structures, algebraic and RPN modes, soft keys and choose boxes. You have to really REALLY want to keep a calculator if you don't pack it up and return it in disgust because the manual doesn't tell you how to add 2+2 until page 50. There is no GUI, only the manuals. And the manuals are absolutely appalling. Spectacularly appalling. Inexcusably appalling. I know people worked hard on them and the prose is generally clear when there aren't typographical errors, but they are simply not instructive for a new user, and HP really should think about new users to grow the customer base. Dave === Subject: Re: HP 50g keyboard layout posting-account=ZNjVjAoAAAC_2bLg7tM6VOk-1aOe-x5C > > > > > manuals need to be rewritten from a newbie point of view > > > But manuals are no longer read :) > > > Or as one might imagine Marshall McLuhan saying: > > \The graphical user interface is now the entire message\ :) > > While I appreciate John's humor here, I don't think the case applies. > When the HP 50g comes out the shrink wrap, there is no GUI help, just > a manual and a CD. ÊThe manual is full of typos and nearly \ impossible > to understand for a new user like myself (I hadn't seen a new HP > calculator since I bought a 41CV around 1982). ÊI'd expect \ the > beginning of the manual to explain how to add, subtract, multiply and > divide, but instead it plunges you into 50(!) pages of modes, number > formats, how to enter hideously complex equations, angle measurements, > coordinate systems, CAS settings, display modes, stack properties, > equation editor properties, calculator objects, stack expressions, > equation editors, variable names, organizations, directory structures, > algebraic and RPN modes, soft keys and choose boxes. > > You have to really REALLY want to keep a calculator if you don't pack > it up and return it in disgust because the manual doesn't tell you how > to add 2+2 until page 50. > > There is no GUI, only the manuals. And the manuals are absolutely > appalling. ÊSpectacularly appalling. Inexcusably appalling. \ ÊI know > people worked hard on them and the prose is generally clear when there > aren't typographical errors, but they are simply not instructive for a > new user, and HP really should think about new users to grow the > customer base. > > Dave And if you're buying a 50g, you probably know how to operate a regular calculator. [2] [+] [2] [Enter] on a fresh out of the shrinkwrap 50g, at least on mine, just like any other algebraic calculator. And, I was pretty sure my dead-tree manual covered that quickly. (Yes, it did also cover switching to RPN early on.) === Subject: Re: HP 50g keyboard layout posting-account=57eBeAkAAABkNMhsZnDBzGQsstJRmvKD Gecko/2009011913 Firefox/3.0.6,gzip(gfe),gzip(gfe) > There is no GUI, only the manuals. And the manuals are absolutely > appalling. Spectacularly appalling. Inexcusably appalling. I > know people worked hard on them and the prose is generally clear > when there aren't typographical errors, but they are simply not > instructive for a new user, and HP really should think about new > users to grow the customer base. Looks like as I am not the only one with this opinion. Andreas http://www.software49g.gmxhome.de === Subject: Re: HP 50g keyboard layout > >> This, then, is unrelated to the problem where if a key is >> pressed just as the CPU goes to sleep, it isn't processed >> until after the CPU wakes up again (on the following >> keystroke). ÊIt's the latter that I find more annoying... > > A very useful workaround to this so-called \Busy Bug\ is to turn the > clock display on (MODE DISP Clock, or -40 SF) and leave it on > permanently. Any keystroke caught in the evil clutches of this bug > will be released and executed by the next clock display update (every > second) or by the next keystroke, whichever comes first. The extra > battery drain is negligible, and no keystrokes are completely lost. Brilliant! I'll do that. === Subject: HP50G - How to use built-in variable browser in Equation \ Libibrary? Hi All, I've been \dissecting\ the HP Equation Libraries (Libs 226 & 227) to find \ the command that launches the variable browser that these libraries use as I \ want to use a similar function in my own programs. In the past on my HP48GX \ I used another library browser but this time on the HP50G I thought it may be more efficient to use the one that HP built into the equation library. If \ anyone had previous experience doing this it would be greatly appreciated if \ you would advise the XLIB name or ROMPTR & the form of the input? Otherwise \ any other comments or suggestions would be great. Michael === Subject: Re: HP50G - How to use built-in variable browser in Equation Libibrary? InfoPath.1; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR \ 1.1.4322; .NET CLR 3.0.04506.648),gzip(gfe),gzip(gfe) On Feb 15, 8:21Êam, \Michael & Maria Lopez\ \ > Hi All, > > I've been \dissecting\ the HP Equation Libraries (Libs 226 & 227) to \ find > the command that launches the variable browser that these libraries use as \ I > want to use a similar function in my own programs. Several other people have had a go at similar projects. Here's one from hpcalc.org that claims to be a custom equation browser (I've never tried it): http://www.hpcalc.org/details.php?id=2780 And during the time that the eqn library went missing from the HP49G, Wolfgang Rautenberg made it into a standalone library, which might be worth looking at: http://www.hpcalc.org/details.php?id=6050 Bill === Subject: Projectile Motion Problem and HP solver One of my students came to me the other day to help him solve a projectile motion problem in Physics by Cutnell and Johnson (7th Edition) Problem 3-21 A jet is flying at 315m/s at an angle of +15 degrees with the horizontal at an altitude of 2000m when it releases it auxiliary fuel tank. How far will the fuel tank travel in the +X direction before it hits the ground and what will it's velocity be.( also give X and Y components of the final velocity as it hits the ground.)( Neglect air friction) Now assume the jet is flying at an angle of -15 degrees with the horizontal and solve the problem again. I thought I would save time and use the built in Projectile Motion solver in the Equation Library in my HP48GX. However when I plugged in the values given above for Vo, Xo,Yo, Yfinal,and theta, the solver gave me a negative value for the time and a negative value for X. Any idea as to what is going on? I tried the same thing on my HP50G and I got the same results. I then used the polynomial solver to solve for the time of flight in the Y directiom using 1/2gt^2-Voyt-Yo=0 and got the time of flight. Then I plugged this value into the PM solver for t along with the rest of the variables listed above and it solved for X correctly. Again what is going on? I have tried solving this type of problem before ( an example is the PM lab experiment we do in one of my classes where Yo=+0.25m,Xo=0.00m Vo=3.00 m/s, theta = +15.0 degrees and Yfinal= 0.00m)and the solver solves for the correct time of flight and the X distance. This is really strange. I have tried this with my calulator with a completely clean memory (Clear memory: recover memory NO) as well as with lot of variables etc stored in memory and the results are always the same with the jet problem. Harold A Climer Dept. Of Physics Geology, and Astronomy U.T, Chattanooga Rm. 406A Engineering, Math & Computer Science Building 615 McCallie Ave. Chattanooga TN 37403 Harold-Cimer@utc.edu === Subject: Re: Projectile Motion Problem and HP solver > One of my students came to me the other day to help him solve a > projectile motion problem in Physics by Cutnell and Johnson > (7th Edition) Problem 3-21 > A jet is flying at 315m/s at an angle of +15 degrees with the > horizontal at an altitude of 2000m when it releases it auxiliary fuel > tank. How far will the fuel tank travel in the +X direction before it > hits the ground and what will it's velocity be.( also give X and Y > components of the final velocity as it hits the ground.)( Neglect air > friction) > Now assume the jet is flying at an angle of -15 degrees with the > horizontal and solve the problem again. > I thought I would save time and use the built in Projectile Motion > solver in the Equation Library in my HP48GX. > However when I plugged in the values given above for Vo, Xo,Yo, > Yfinal,and theta, the solver gave me a negative value for the time and > a negative value for X. > Any idea as to what is going on? I tried the same thing on my HP50G > and I got the same results. > I then used the polynomial solver to solve for the time of flight in > the Y directiom using 1/2gt^2-Voyt-Yo=0 and got the time of flight. > Then I plugged this value into the PM solver for t along with the rest > of the variables listed above and it solved for X correctly. > Again what is going on? The quadratic has two solutions, and the equation library solver happens to give you the other one by default. ;-) You can get the other one by entering an initial guess for t that's closer to the value you want (say, 100 seconds). Enter 100 for t before solving for it. For more details, see pages 18-6 through 18-8 in the user guide (the section on SOLVR). When I do this, I get t=30.15 seconds. After doing this, you also get the corresponding positive solutions for x, vx, vy, etc when you solve for them. > Harold-Cimer@utc.edu Typo in your sig? === Subject: Re: Question About HP50g Keys? posting-account=EjMqYwoAAADPG-eKZyudrVG4uwsv15vp Trident/4.0; SLCC1; .NET CLR 2.0.50727; Tablet PC 2.0; .NET CLR \ 3.5.21022; OfficeLiveConnector.1.3; OfficeLivePatch.0.0; .NET CLR 3.5.30729; \ .NET CLR 3.0.30618),gzip(gfe),gzip(gfe) > Do the paints on the keys come off over time under normal to heavy > useage? > > I learned that my old 48SX (Singapore) and 32SII (USA) keys were > molded, not painted like the new generation of HP calculators. It > appears that starting or not long after production in Indonesia, the > quality of HP calcs are not what they used to be. > > When I bought my 32SII (still in excellent condition) years ago, I was > afraid that the paints on the keys would rub off, not knowing they > were molded, so I covered the key tops with a thin layer of clear nail > polish, hoping to make it last as long as possible. I haven't used it > much but the clear coat is still there! > > I wonder if anyone who has problem with the paint on the 50g rubbing > off? > > Also, are the keys on the 50g the same for all production? > > I saw comments saying they are a little hard to press and can be > tiresome after a while. My own experience with less-than-a-week old > used 50g (CNA733xxxx) is that they are OK, but some keys are smaller > than the others. Not like the 48SX where only the ENTER key is twice > as wide. I wish they had the alphabet letters printed to the side of > the key like they did in the 48SX, instead of on top, making the key > tops appear clustering. > > I do think about putting a clear coat of nail polish on the key tops > so they outlast the calculator useful life. > After 15 months of hardcore use (hp49g+): http://erwin.ried.cl/?modo=visor&elemento=200 === Subject: Re: Question About HP50g Keys? posting-account=B0WVuwoAAAB0jipMiVc4s-L42AIMUuHa Gecko/2008122011 Iceweasel/3.0.5 \ (Debian-3.0.5-1),gzip(gfe),gzip(gfe) > > Do the paints on the keys come off over time > > under normal to heavy useage? > > I've pounded quite heavily for a long time on my 50g, and its keytops > are still perfect. ÊNo broken hinges either. \ ÊNor does the paint wear > off the case. ÊSince I was one of the loudest and most \ obnoxious > bellyachers about these problems on earlier models, I feel obliged to > point out these improvements by HP. > > -Joe- Hi Joe, That was what I was looking for from someone who's been using the 50g for quite sometime. It's good to know the keys don't wear off too easily and too quickly. I'm glad HP didn't ignore your \loudest and most obnoxious bellyachers about these problems on earlier models\ and illustrated the improvements in the 50g. :) I do hope HP continues to listen to the feedback. then make improvements to bring its reputation back to the golden days. I hope HP does not become just another Casio/TI in disguise. Not that they are bad. They're just not HP. At the very least, I hope HP does not drop the RPN. PS: I in Best Buy a week or so a go and saw the HP10s in white blastic case instead of the usual brown/black. I couldn't believe my eyes. It looks so... cheap. And it is cheap! === Subject: Re: Question About HP50g Keys? posting-account=sOAX1QkAAAC-FcySTSbz29Uk8huUtFRz CLR 1.1.4322; .NET CLR 2.0.50727),gzip(gfe),gzip(gfe) > PS: I in Best Buy a week or so a go and saw the HP10s in white blastic > case instead of the usual brown/black. I couldn't believe my eyes. It > looks so... cheap. And it is cheap! The 10s is not an HP. It is a Casio clone that was rebranded. S.C. === Subject: InformBox Field Message Handler not triggering posting-account=r7Wz2woAAADbojNXOAG_GtmZnOckiljZ Gecko/2008052906 Firefox/3.0,gzip(gfe),gzip(gfe) Can't seem to get the field message handler to trigger? Trying to check that a field entry is less than 359.99 and gretaer than 0.0, before that field looses focus to the next example of one of the field definitions ( Field3 definition ) ' :: IfMsgOKKey OVER#=case :: ( after ok pressed ) DROP chkazi ITE :: TRUE TRUE ; :: FALSE ; ; DROPFALSE ; ( Field Message Handler ) ( 'DROPFALSE ) IfFieldTypeText ( Field Type ) { IfObReal } ( Allowed Types ) BINT3 ( Decomp object ) MINUSONE ( No choose list ) MINUSONE ( No choose decomp ) 0. ( Reset Value ) uses IfMain2 appreciate a heads up === Subject: Re: InformBox Field Message Handler not triggering posting-account=57eBeAkAAABkNMhsZnDBzGQsstJRmvKD Gecko/2009011913 Firefox/3.0.6,gzip(gfe),gzip(gfe) IfMsgOKKey is for modyfing the [ENTER] and [OK] action. If you modify it you have to take care completly of the OK-procedure. I am quite sure that is not what you want to do :-) IfMsgLooseFocus is the message that should suit your needs. Here is a message handler that checks that the supplied value is between % 257 and % 1792. It is from my TreeBrowserLibrary, adjust it to your needs. If the value is out of range the field stays blank and the field does not change. If there is only one message to handle you can use #=case instead of OVER#=case, saves 2,5 bytes because the DROP is not needed. Andreas http://www.software49g.gmxhome.de :: IfMsgLooseFocus #=case :: ( ich bin noch in dem Feld ) FLASHPTR IfGetCurrentFieldValue CRUNCH ( ob -> % Internal version of ->NUM. ) DUP % 257 %> SWAP % 1792 %< AND ( returns TRUE if both FLAGS are TRUE ) ITE :: FLASHPTR IfGetCurrentFieldValue DUPTYPEREAL? IT %IP FLASHPTR IfSetCurrentFieldValue ; :: FLASHPTR IfGetFieldResetValue FLASHPTR IfSetCurrentFieldValue label ) TRUE ( Field or Label [True or False]) ONEONE MAKEGROB ( #height #width -> grob Creates a blank grob. ) FLASHPTR IfSetGrob DROPZERO ( in diesem Fall wird das Feld erst verlassen, wenn eine Zahl zwischen 256 und 1792 eingegeben wird ) ; FALSE ; FALSE ; === Subject: Re: InformBox Field Message Handler not triggering posting-account=Q2CEjQoAAACue5ZDDhUeRzv1w0u8hxZE rv:1.9.0.6) Gecko/2009011912 Firefox/3.0.6,gzip(gfe),gzip(gfe) > IfMsgLooseFocus is the message that should suit your needs. I'm sure what you've posted works fine, I am just wondering what made you decide to use that instead of IfMsgSetFieldValue which only is run upon validation of an entry. Yours will run every time you arrow in or out of the field. Was there something you couldn't accomplish with the other? TW === Subject: Re: InformBox Field Message Handler not triggering posting-account=57eBeAkAAABkNMhsZnDBzGQsstJRmvKD Gecko/2009011913 Firefox/3.0.6,gzip(gfe),gzip(gfe) Hello Tim, > I am just wondering what made > you decide to use that instead of IfMsgSetFieldValue which only is run > upon validation of an entry. Yours will run every time you arrow in or > out of the field. > Was there something you couldn't accomplish with the other? The task was not being able to leave the field until something valid was entered. E.g. one should not be able to leave the field through the cursor keys. IIRC I could not accomplish this with IfMsgSetFieldValue but it has Andreas === Subject: Re: InformBox Field Message Handler not triggering posting-account=Q2CEjQoAAACue5ZDDhUeRzv1w0u8hxZE Gecko/2009011913 Firefox/3.0.6,gzip(gfe),gzip(gfe) > The task was not being able to leave the field until something valid > was entered. E.g. one should not be able to leave the field through > the cursor keys. Makes sense then I guess. I have used BINT5 to just validate entry when they type something set the active field back if it was invalid to stay on the same spot. A nice little \bad point number\ or \Input must be 360 > x > 0!\ or whatever would also pop up. All my stuff would already have valid inputs of some kind and nothing was empty. TW === Subject: Random number MATRIX with 50g posting-account=rpPi1gkAAACmzLt0zzYN-8SW58_c7iCP .NET CLR 2.0.50727; .NET CLR 3.0.04506),gzip(gfe),gzip(gfe) Hello Everybody I'm trying to learn to program with the HP50g and one of my first attempts has been to generate a matrix with 4 rows and 6 columns (4x6 or 6x4?). This matrix must contain in each row six unique integers => 1 and =< 49 sorted in ascending order. the first part I think I've got under control. I've written the following short program that delivers a matrix 4 rows of which each row contains six integers not greater than 49 and not smaller than 1, sorted in ascending order. << 1 4 START 1 6 START RAND NEXT 6 -> LIST 49 * 1 ADD FLOOR SORT OBJ-> ->ARRY NEXT 4 ROW-> >> However, I have had no succes in trying to check if any number is duplicated in any row and if it is, it must be replaced. The replacement random number must also be verified to ensure it does not duplicate any of the other 5 numbers. Then the row must be sorted again. I found that it happens very often that the same number is repeated algorithm RAND 49 * FLOOR 1 + duplicates CONSEQUTIVE numbers. << 1 200 START RAND 49 * FLOOR 1 + NEXT 0 'I' STO 1 199 START OVER - IF 0 == THEN I 1 + 'I' STO END NEXT DROP I >> I placed the program in a 1 100 START ... NEXT loop and incremented a variable with the value of I at the end of each loop. The procedure took 22min 20sec when the calculator was powered from a usb source. there was 376 duplications of consequetive numbers out of the 20 000 randomly created numbers. This means that out of a sample of 20 000 the odds are about 1.9% that consequetive numbers will be a duplication, the odds that there will be a duplication in a sequence of six such numbers will be much higher, which underlines the need for a check of duplication. Anybody outhere with any ideas? Kaspaas === Subject: Re: Random number MATRIX with 50g posting-account=zYTuBQoAAAC_bXzGjGVT5rxv8bOnpefP rv:1.9.0.6) Gecko/2009011912 Firefox/3.0.6,gzip(gfe),gzip(gfe) > Anybody outhere with any ideas? Can different rows share the same numbers? Put the numbers 1 through 48 in a list, then shuffle the list, then take numbers from the list in order. To shuffle, take pairs of random numbers between 0 and 49 and swap the value at the random positions. Or, put numbers in list, pick random number from list (based on position), then remove number from list, repeat. Picking 6 random numbers from a list that ranges from 1 to 48 is not much different than a program that generates random lottery numbers. Google for a lottery number generator. Or just use this: http://www.hpcalc.org/details.php?id=4825 === Subject: Re: Random number MATRIX with 50g > I'm trying to learn to program with the HP50g and one of my first > attempts has been to generate a matrix with 4 rows and 6 columns > (4x6 or 6x4?). This matrix must contain in each row six unique integers > 1 <= N <= 49 sorted in ascending order. > The first part I think I've got under control. Just as economists, politicians and many others think they've got everything under control, until the fatal flaws pop up :) > RAND 49 * 1 ADD FLOOR Here's where we need some insights of Joe Horn, who, like Srinivasa Ramanujan, is a man who knows numbers :) Every output of RAND is a non-zero real value less than 1 (this fact takes analysis of the ROM code to prove, but it's true). Here are two possible outputs of RAND, then the result of the above: .000000000001 -> 1. .999999999999 -> 50. So you could end up with any result from 1 to 50, not guaranteed to be from 1 to 49! A result of 50 will be infrequent, but so is a fatal outcome of Russian Roulette, so why play it at all? As Joe has instructed us in the past, RAND 49 * CEIL is the way to go (and even simpler), resulting in: .000000000001 -> 1. .999999999999 -> 49. > However, I have had no succes in trying to check > if any number is duplicated in any row What you want, for example, is the first six values in a random permutation of all integers from 1 to 49; by definition of \permutation,\ those values will be all different. Now we again need Joe's Bible of Numbers: \Random integers without repeats\ [Jul 22 1996] @ Six random unique integers from 1 to 49: \\<< 1 49 FOR k k DUP RAND * CEIL ROLLD NEXT 43 DROPN 6 \\->LIST \\>> Now you can SORT those, repeat four times and make a matrix, Amen: \\<< 1 4 START 1 49 FOR k k DUP RAND * CEIL ROLLD NEXT 43 DROPN 6 \\->LIST SORT LIST\\-> DROP NEXT { 4 6 } \\->ARRY \\>> You can do this on all HP48/49/50 except for HP48S[X], which didn't have SORT (but there again, Joe did :) \The man who knew numbers\ (and infinity): http://scienceworld.wolfram.com/biography/Ramanujan.html http://en.wikipedia.org/wiki/Srinivasa Ramanujan http://www.amazon.com/dp/0671750615 http://www.mathpages.com/home/kmath028.htm (including Feynman and Bethe) \An equation for me has no meaning, unless it represents a thought of \ God\ [Srinivasa Ramanujan] [r->] [OFF] === Subject: Re: Random number MATRIX with 50g posting-account=rpPi1gkAAACmzLt0zzYN-8SW58_c7iCP .NET CLR 2.0.50727; .NET CLR 3.0.04506),gzip(gfe),gzip(gfe) It has been most insightfull and very helpfull. > Here are two possible outputs of RAND, then the result of the above: > > .000000000001 -> 1. > .999999999999 -> 50. > I was just about to disagree with your second statement but when I tested it it turned out just like you told me :) the object of this exercise was to construct a random number generator for the lottery. In ZAR (and I believe it is the same in the UK) you have to choose six numbers between 1 and 49. Now: 49 6 COMB ==> 13983816 Thus, the definition of the National Lottery: TAX FOR PEOPLE WHO DON'T DO MATHS! Thanx again folks! === Subject: Re: Random number MATRIX with 50g Put them first in a list and check with POS if found re-random if not append until list full then make a matrix either a) LIST-> DROP 6 4 ->ARRY b) the above is so good... kirjoitti > Hello Everybody > > I'm trying to learn to program with the HP50g and one of my first > attempts has been to generate a matrix with 4 rows and 6 columns (4x6 > or 6x4?). This matrix must contain in each row six unique integers => > 1 and =< 49 sorted in ascending order. > > the first part I think I've got under control. I've written the > following short program that delivers a matrix 4 rows of which each > row contains six integers not greater than 49 and not smaller than 1, > sorted in ascending order. > > << > 1 4 START > 1 6 START > RAND > NEXT > 6 -> LIST 49 * 1 ADD FLOOR SORT > OBJ-> ->ARRY > NEXT > 4 ROW-> >>> > > However, I have had no succes in trying to check if any number is > duplicated in any row and if it is, it must be replaced. The > replacement random number must also be verified to ensure it does not > duplicate any of the other 5 numbers. Then the row must be sorted > again. > > I found that it happens very often that the same number is repeated > algorithm RAND 49 * FLOOR 1 + duplicates CONSEQUTIVE numbers. > > << 1 200 START > RAND 49 * FLOOR 1 + > NEXT > 0 'I' STO > 1 199 START > OVER - IF 0 == > THEN > I 1 + 'I' STO > END > NEXT > DROP I >> > > I placed the program in a 1 100 START ... NEXT loop and incremented a > variable with the value of I at the end of each loop. The procedure > took 22min 20sec when the calculator was powered from a usb source. > there was 376 duplications of consequetive numbers out of the 20 000 > randomly created numbers. > This means that out of a sample of 20 000 the odds are about 1.9% that > consequetive numbers will be a duplication, the odds that there will > be a duplication in a sequence of six such numbers will be much > higher, which underlines the need for a check of duplication. > > Anybody outhere with any ideas? > > > Kaspaas === Subject: Statistic Pac for 48sx posting-account=7OS_CAoAAABr2aaw7eKrVJfoiJ8Rom3f InfoPath.2),gzip(gfe),gzip(gfe) Hello everyone. I've been using my 48sx now for 20 years and I love my calculator! I'm currently earning a Masters in Statistics. I noticed sometime ago that the 48sx had a Statistic Pac card, does anyone know what is does? I would like to know the capabilities or maybe see the manual. Also, does anyone know where I can buy one if I think it will help me. === Subject: 50g: enormous-size posting-account=HQcyKwkAAAAfyVM-3k2cuaNBENqZAwPy Gecko/2009011913 Firefox/3.0.6,gzip(gfe),gzip(gfe) My calculator has normal-size over my hand but... http://i40.tinypic.com/2nkiaeh.jpg Model: Kate Portales Age: 2 months old - Gaak - === Subject: Re: enormous-size Tous mes voeux de bonheur pour Kate ;) F\.8elicitions au Papa et \.88 la Maman ! No need for translation, I think! :D Gilles > My calculator has normal-size over my hand but... > http://i40.tinypic.com/2nkiaeh.jpg > > Model: Kate Portales > Age: 2 months old > > - Gaak - > === Subject: Re: 50g: enormous-size > My calculator has normal-size over my hand but... > http://i40.tinypic.com/2nkiaeh.jpg > > Model: Kate Portales > Age: 2 months old Congratulations to you and your wife - she's beautiful. -- Bruce Horrocks Surrey England (bruce at scorecrow dot com) === Subject: Re: 50g: enormous-size posting-account=v6m75AoAAAAgp3vyiLFAfyqmfMcXEPkm Gecko/2009011913 Firefox/3.0.6,gzip(gfe),gzip(gfe) Que buenas noticias. Felicidades por tu hija Gaak! === Subject: Re: 50g: enormous-size posting-account=B0WVuwoAAAB0jipMiVc4s-L42AIMUuHa Gecko/2009020409 Iceweasel/3.0.6 \ (Debian-3.0.6-1),gzip(gfe),gzip(gfe) She was smiling. It got to be in RPN mode. :) > My calculator has normal-size over my hand \ but...http://i40.tinypic.com/2nkiaeh.jpg > > Model: Kate Portales > Age: 2 months old > > - Gaak - === Subject: One sided limit producing unexpected (wrong?) answer posting-account=C_LbLAoAAACyYm6T7K_3HQaMLf5zvA2j SLCC1; .NET CLR 2.0.50727; .NET CLR 3.0.04506; Media Center PC 5.0),gzip(gfe),gzip(gfe) I'm trying to prove that Lim(FLOOR(X) - X , 'X=4-0' ) = -1, and so far: 1- the graphic method assures me it's -1 2 - evaluating the function @ 3.9999 and 4.0001 confirms it 3 - the answer in the booklet _is_ -1 but, using lim from the CALC menu gives me 0. I've read the section in the manual dealing with limits and a couple of discussions on this group and everything seems to be in order on my part, unless I messed up with a flag or settings accidentally? I got an HP50g with ROM 2.09 TIA for any advice - Louie - === Subject: Re: One sided limit producing unexpected (wrong?) answer posting-account=nKQXlgkAAABFcwCQitpPqM7oKmh-_khh Gecko/2009011913 Firefox/3.0.6,gzip(gfe),gzip(gfe) > I'm trying to prove that Lim(FLOOR(X) - X , 'X=4-0' ) = -1, and so > far: > Ê1- the graphic method assures me it's -1 > Ê2 - evaluating the function @ 3.9999 and 4.0001 confirms it > Ê3 - the answer in the booklet is -1 > but, using lim from the CALC menu gives me 0. I've read the section in > the manual dealing with limits and a couple of discussions on this > group and everything seems to be in order on my part, unless I messed > up with a flag or settings accidentally? > I got an HP50g with ROM 2.09 > > TIA for any advice > > - Louie - Lim may not know about discontinuous functions. Try Lim(floor(x),x=-0). === Subject: Re: HP50G - How to use built-in variable browser in Equation \ Libibrary? Michael On Feb 15, 8:21 am, \Michael & Maria Lopez\ > Hi All, > > I've been \dissecting\ the HP Equation Libraries (Libs 226 & 227) to \ find > the command that launches the variable browser that these libraries use as \ > I > want to use a similar function in my own programs. Several other people have had a go at similar projects. Here's one from hpcalc.org that claims to be a custom equation browser (I've never tried it): http://www.hpcalc.org/details.php?id=2780 And during the time that the eqn library went missing from the HP49G, Wolfgang Rautenberg made it into a standalone library, which might be worth looking at: http://www.hpcalc.org/details.php?id=6050 Bill === Subject: Re: HP50G - How to use built-in variable browser in Equation Libibrary? posting-account=57eBeAkAAABkNMhsZnDBzGQsstJRmvKD Gecko/2009011913 Firefox/3.0.6,gzip(gfe),gzip(gfe) if you use Nosy to take a look at EQNLIB (and CONLIB as well) you will see that they use the ancient browser BRbrowse as user interface. BRbrowse is documented in http://www.hpcalc.org/details.php?id=1712 You will need a lot of System RPL programming (and time) to create a browser similiar to the EQNLIB. Wolfgang Rautenberg«s EQL+ is using the 48GX full screen \ choose command to create his EQNLIB. If you just want to create something similar than the EQNLIB I also recommend my own TreeBrowser. With the TB Builder you are guided through the process of creating a data set for my TreeBrowser and there is also exhaustive documentation (~ 50 pages). Take a look at http://www.software49g.gmxhome.de and download a ready to use EMU49 Document (*.E49) at \ http://www.software49g.gmxhome.de/ENGLISCH.zip. Note that the programs for the emulator do not run on a physical machine and that this is commercial software. HTH, Andreas http://www.software49g.gmxhome.de === Subject: Re: HP50G - How to use built-in variable browser in Equation \ Libibrary? Hi Andreas, Sounds like the browser I am thinking off is BRbrowser. I'll review the documentation you suggest & see if I can get it to work on the HP50G. Michael if you use Nosy to take a look at EQNLIB (and CONLIB as well) you will see that they use the ancient browser BRbrowse as user interface. BRbrowse is documented in http://www.hpcalc.org/details.php?id=1712 You will need a lot of System RPL programming (and time) to create a browser similiar to the EQNLIB. Wolfgang Rautenberg«s EQL+ is using the 48GX full screen \ choose command to create his EQNLIB. If you just want to create something similar than the EQNLIB I also recommend my own TreeBrowser. With the TB Builder you are guided through the process of creating a data set for my TreeBrowser and there is also exhaustive documentation (~ 50 pages). Take a look at http://www.software49g.gmxhome.de and download a ready to use EMU49 Document (*.E49) at http://www.software49g.gmxhome.de/ENGLISCH.zip. Note that the programs for the emulator do not run on a physical machine and that this is commercial software. HTH, Andreas http://www.software49g.gmxhome.de === Subject: Re: HP50G - How to use built-in variable browser in Equation \ Libibrary? > I've been \dissecting\ the HP Equation Libraries (Libs 226 & 227) to \ findthe command that launches the variable browser that these libraries use What do you mean by \variable browser\? >> BRbrowse is documented in http://www.hpcalc.org/details.php?id=1712 ML: > Sounds like the browser I am thinking off is BRbrowser. I'll review the > documentation you suggest & see if I can get it to work on the HP50G. The HP49G/50G series internal library contains more functions, and renumbered some of the original HP48G internal functions, hence you may need a \library function browser\ (easy to make) to discover the correspondence between the old function numbers and the new ones :) Screen sizes (variable across entire 49G/50G series), plus variable font sizes, all contribute to greater complexity in the latter library, as well as needing care in user programming. For example, if one wants solely to precisely duplicate the \CHOOSE\ \ function, except to use the full screen for it, this can be done in 99 bytes for either HP48G series or HP49G/50G series, and comparison of the source will show one or two functions whose numbering changed between series: Full-screen CHOOSE for any HP48G/49G/50G series calculator The above post itself contains precompiled binaries for each CHOOSE; so does the following application which employs them: http://www.hpcalc.org/details.php?id=6431 (ROLDXJ) Additional applications (e.g. multi-level CHOOSE) in complete original \ thread: http://www.hpcalc.org/details.php?id=6435 \Multi-level\ menus within a single menu are also possible to construct within a \custom\ menu (CST), or within any menu, even a temporary menu (via use of the \go to page N of current menu\ system function). >> You will need a lot of System RPL programming (and time) >> to create a browser similiar to the EQNLIB. Hmm.. How come I've seen a \User Equation Library\ engine, somewhat similar to the original in functional design, but with all user-supplied info, implemented even in UserRPL, using CHOOSE for all display and navigation? (which can be enhanced by using the full-screen CHOOSE above, in place of the built-in CHOOSE) (nor is HP's own original unmodifiable Equation Library), but still met its purpose, and it's very easy to create the input data. [r->] [OFF] === Subject: Re: HP50G - How to use built-in variable browser in Equation \ Libibrary? By variable browser I mean the function in the HP equation library that displays the variables used & units. I have previously replicated this type \ of operation in the user RPL programs I developed for my HP48GX by using the \ library program: \BROWSE V2.6\ by Diego Berge. However, as I would have to \ modify this to work on the HP50G, I thought it may be smarter to tap into the browser that HP used in the equation library instead. The \CHOOSE\ function from my understanding essentially provides what I \ need but I would prefer to make use the full screen on my HP50G & do not need to \ select any items on display. I'll have a look at the links you suggest & me \ come back with more questions but do like your back to basics approach. Michael > I've been \dissecting\ the HP Equation Libraries (Libs 226 & 227) to > findthe command that launches the variable browser that these libraries > use What do you mean by \variable browser\? >> BRbrowse is documented in http://www.hpcalc.org/details.php?id=1712 ML: > Sounds like the browser I am thinking off is BRbrowser. I'll review the > documentation you suggest & see if I can get it to work on the HP50G. The HP49G/50G series internal library contains more functions, and renumbered some of the original HP48G internal functions, hence you may need a \library function browser\ (easy to make) to discover the correspondence between the old function numbers and the new ones :) Screen sizes (variable across entire 49G/50G series), plus variable font sizes, all contribute to greater complexity in the latter library, as well as needing care in user programming. For example, if one wants solely to precisely duplicate the \CHOOSE\ function, except to use the full screen for it, this can be done in 99 bytes for either HP48G series or HP49G/50G series, and comparison of the source will show one or two functions whose numbering changed between series: Full-screen CHOOSE for any HP48G/49G/50G series calculator The above post itself contains precompiled binaries for each CHOOSE; so does the following application which employs them: http://www.hpcalc.org/details.php?id=6431 (ROLDXJ) Additional applications (e.g. multi-level CHOOSE) in complete original thread: http://www.hpcalc.org/details.php?id=6435 \Multi-level\ menus within a single menu are also possible to construct within a \custom\ menu (CST), or within any menu, even a temporary menu (via use of the \go to page N of current menu\ system function). >> You will need a lot of System RPL programming (and time) >> to create a browser similiar to the EQNLIB. Hmm.. How come I've seen a \User Equation Library\ engine, somewhat similar to the original in functional design, but with all user-supplied info, implemented even in UserRPL, using CHOOSE for all display and navigation? (which can be enhanced by using the full-screen CHOOSE above, in place of the built-in CHOOSE) (nor is HP's own original unmodifiable Equation Library), but still met its purpose, and it's very easy to create the input data. [r->] [OFF] === Subject: Re: HP50G - How to use built-in variable browser in Equation \ Libibrary? > By variable browser I mean the function in the HP equation library > that displays the variables used & units. All you need to do is collect the information to be displayed in a list; the \browser\ function (in ROM) is then used to display any list, optionally also providing for either selecting one line or multiple lines (the former is internally used in HP48G[X][+] for CHOOSE, and the latter for the flag browser). The HP48 Equation library also makes use of the same internal library \ \B3\ > I have previously replicated this type of operation in the user RPL \ programs > I developed for my HP48GX by using the library program: \BROWSE V2.6\ by \ Diego Berge. I once used some earlier version of Diego's full-screen chooser, before ever looking into the internal browser myself. Now I've just tried the two \chooser test programs\ found in my earlier \ noted post, with both 'BROWSE' and 'browse' of \BROWSE V2.6\ The results (returned selections) expected by the first program are delivered as expected, but the results (on-screen display) expected by the second program are not. Specifically, an empty title string should display a list with no title \ area, but Browse 2.6 displays a blank title area instead, wasting one screen line, and not looking quite as good. Additionally, 33-character data lines are always cut off prematurely with the \small font\ browser, after the 28th character, even when all of the characters (in my \ruler\ lines) can fit. So I think that I have improved the generality of the CHOOSE functions (as well as making them smaller), by \hard-coding\ fewer values, letting the internal browser do more of what it was designed to accomplish, after seeing that the internal library actually figures out and adjusts many things for itself, for a much wider range of inputs. I did not, however, implement the \multi-item\ alternative (with a list on level 1, providing a check box for each item), which Diego included in his library, since I was interested only in direct replacements for the UserRPL CHOOSE command. > However, as I would have to modify this to work on the HP50G, > I thought it may be smarter to tap into > the browser that HP used in the equation library instead. Is it basically the same process as on HP48G[X][+], assembling data in a list, then using the \browser\ to display it (and optionally to choose single items)? > The \CHOOSE\ function, from my understanding, > essentially provides what I need, > but I would prefer to make use of the full screen on my HP50G > and do not need to select any items on display. That's exactly what occurs when the final argument to CHOOSF is zero: no \selection,\ the menu shows only \OK\ (no \Cancel\) and the return value is always zero (nothing selected), exactly as in the original HP48G[X][+] UserRPL CHOOSE The HP49G/50G series UserRPL CHOOSE (which can not be made full-screen) treats a final argument of zero the same as 1 (always offers \ \selection\), but CHOOSF offers what you want, and should work for you, as well as possibly spare you some TTRMs during development :) > Back to basics approach. Keep it simple, smartfolks :) [r->] [OFF] === Subject: Re: HP50G - How to use built-in variable browser in Equation \ Libibrary? I like your thinking John ;). Took me a while but it also finally dawned on \ me (after starting a project to modify other \Browse\ libraries) that it would be smarter & more elegant to use what is already built into the HP50G \ but admitedly not well document. Haven't had time yet to fully absorb your various posts/documentation but I \ take it that CHOOSF can also be utilised in userRPL programs as I might modify some of my earlier programs as well? Michael > >> By variable browser I mean the function in the HP equation library >> that displays the variables used & units. > > All you need to do is collect the information to be displayed in a list; > the \browser\ function (in ROM) is then used to display any list, > optionally also providing for either selecting one line or multiple lines > (the former is internally used in HP48G[X][+] for CHOOSE, > and the latter for the flag browser). > > The HP48 Equation library also makes use of the same internal library \ \B3\ > >> I have previously replicated this type of operation in the user RPL >> programs >> I developed for my HP48GX by using the library program: \BROWSE V2.6\ \ by >> Diego Berge. > > I once used some earlier version of Diego's full-screen chooser, > before ever looking into the internal browser myself. > > Now I've just tried the two \chooser test programs\ found in my earlier \ > noted post, > with both 'BROWSE' and 'browse' of \BROWSE V2.6\ > > The results (returned selections) > expected by the first program are delivered as expected, > but the results (on-screen display) expected by the second program are > not. > > Specifically, an empty title string should display a list with no title > area, > but Browse 2.6 displays a blank title area instead, > wasting one screen line, and not looking quite as good. > > Additionally, 33-character data lines are always cut off prematurely > with the \small font\ browser, after the 28th character, > even when all of the characters (in my \ruler\ lines) can fit. > > So I think that I have improved the generality > of the CHOOSE functions (as well as making them smaller), > by \hard-coding\ fewer values, > letting the internal browser do more > of what it was designed to accomplish, > after seeing that the internal library > actually figures out and adjusts many things for itself, > for a much wider range of inputs. > > I did not, however, implement the \multi-item\ alternative > (with a list on level 1, providing a check box for each item), > which Diego included in his library, since I was interested > only in direct replacements for the UserRPL CHOOSE command. > >> However, as I would have to modify this to work on the HP50G, >> I thought it may be smarter to tap into >> the browser that HP used in the equation library instead. > > Is it basically the same process as on HP48G[X][+], > assembling data in a list, then using the \browser\ to display it > (and optionally to choose single items)? > >> The \CHOOSE\ function, from my understanding, >> essentially provides what I need, >> but I would prefer to make use of the full screen on my HP50G >> and do not need to select any items on display. > > That's exactly what occurs when the final argument to CHOOSF is zero: > no \selection,\ the menu shows only \OK\ (no \Cancel\) > and the return value is always zero (nothing selected), > exactly as in the original HP48G[X][+] UserRPL CHOOSE > > The HP49G/50G series UserRPL CHOOSE (which can not be made full-screen) > treats a final argument of zero the same as 1 (always offers \ \selection\), > but CHOOSF offers what you want, and should work for you, > as well as possibly spare you some TTRMs during development :) > >> Back to basics approach. > > Keep it simple, smartfolks :) > > [r->] [OFF] === Subject: Re: HP50G - How to use built-in variable browser in Equation \ Libibrary? > I take it that CHOOSF can also be utilised in userRPL programs? Absolutely! That's what it's for! I keep CHOOSF stored in my HOME directory. Take any UserRPL program using CHOOSE, change one letter to spell it CHOOSF, then that CHOOSE becomes full-screen, and also starts working the same as on HP48G[X][+] in case there is a zero final argument, which then means \no selection, just display\ (CHOOSF also even accepts an empty list, whatever use that may be :) I actually go slightly further in my own calcs (all HP48G/49G/50G), because I even store the following into a variable named 'CHOOSE' in my HOME directory: \\<< IF 1 THEN 'CHOOSF' RCL EVAL ELSE RCLF SIZE 3 > #AB04Dh #AB05Ch IFTE LIBEVAL END \\>> Note that LIBEVAL is not \syseval\ (and that CHOOSE changed its library function number between series :) Since \IF 1\ is always true, every CHOOSE in every program will now always use CHOOSF (or stop with an error if it's missing), so I don't actually have to edit every individual program to be using full-screen CHOOSE all the time. If for some reason I want to see how everything acts with all CHOOSE commands being the original as built in, then I simply change \IF 1\ to \IF 0\ in the 'CHOOSE' program :) This starts taking effect on all UserRPL programs that are edited or transferred since the 'CHOOSE' program was stored into HOME. To store the extra 'CHOOSE' program in the first place, one needs to somehow create the variable name 'CHOOSE', which the built-in editor will initially regard as a syntax error, because command names are normally not allowed as quoted variable names (until a variable is created having the same name). On the 49G/50G series, the \development library\ command S~N can be used: \CHOOSE\ S~N creates 'CHOOSE' with no error. On any HP48/49/50, one can also use \\<< \\->STR #5B15h SYSEVAL \\>> to make a variable name from any string -- make sure to get the argument of SYSEVAL exactly right, and use \\->STR to make sure that there's already a string on the stack, or else the calculator OS may fall off a cliff and wipe memory (this is just the \standard warning\ about all internal system functions, which generally have no protection against wrong input). Hope you find this thread useful. [r->] [OFF] === Subject: Re: HP50G - How to use built-in variable browser in Equation \ Libibrary? BRbrowse in the 50g works like BRbrowse in the HP-48. However some routines of the 50g version will be accessed via FlashPTRs instead of ROMPTRs. HTH Raymond \Michael & Maria Lopez\ schrieb im Newsbeitrag > Hi Andreas, > > Sounds like the browser I am thinking off is BRbrowser. I'll review the > documentation you suggest & see if I can get it to work on the HP50G. > > > Michael > > > if you use Nosy to take a look at EQNLIB (and CONLIB as well) you will > see that they use the ancient browser BRbrowse as user interface. > > BRbrowse is documented in http://www.hpcalc.org/details.php?id=1712 > > You will need a lot of System RPL programming (and time) to create a > browser similiar to the EQNLIB. > > Wolfgang Rautenberg«s EQL+ is using the 48GX full screen \ choose > command to create his EQNLIB. > > If you just want to create something similar than the EQNLIB I also > recommend my own TreeBrowser. With the TB Builder you are guided > through the process of creating a data set for my TreeBrowser and > there is also exhaustive documentation (~ 50 pages). > > Take a look at http://www.software49g.gmxhome.de and download a ready > to use EMU49 Document (*.E49) at > http://www.software49g.gmxhome.de/ENGLISCH.zip. > Note that the programs for the emulator do not run on a physical > machine and that this is commercial software. > > HTH, > Andreas > http://www.software49g.gmxhome.de > === Subject: HP48 : recursion : more and more slower why recursion are more and more slower ? For exemple : Var. name : 'A' Stack : 1: <1h> :: DUP DO>STR DISPROW1 ONE #+ ID A ; === Subject: Re: HP48 : recursion : more and more slower > why recursion are more and more slower ? > > For example : > > Var. name : 'A' > Stack : 1: <1h> > :: > DUP DO>STR DISPROW1 > ONE #+ > ID A > ; > There is a processing relating to Return stack size, > but which ? Insert COLA before ID A How now? [r->] [OFF] === Subject: Re: HP48 : recursion : more and more slower > > Insert COLA before ID A > > How now? > > [r->] [OFF] Ok, if I'm right, COLA drop on return stack before evaluating 'A', Return Stack size don't increase, therefore slowing down disappears. But why, when return stack grow up, is system slowing down ? However Available memory are sufficient... === Subject: Re: HP48 : recursion : more and more slower > Ok, if I'm right, COLA drop on return stack before evaluating 'A', > Return Stack size don't increase, therefore slowing down disappears. You are right. > But why, when return stack grow up, is system slowing down ? > However Available memory are sufficient... Besides occasional GC (with increasing frequency as memory decreases), does the system need to move the entire ever growing return stack (e.g. via MOVERS[D/U]) each time? Hopefully each of the six internal MOVE functions may benefit from some ARM help in the 49/50 series ROMS on 49G+/50G series, but the time would still be proportional to the size of the area to be moved. If I knew how to use the emulator debugger, I might be able to see whether that's what happens, but I never debug anything :) -- === Subject: Re: HP48 : recursion : more and more slower <499a7044$0$9408$ba4acef3@news.orange.fr> posting-account=57eBeAkAAABkNMhsZnDBzGQsstJRmvKD Gecko/2009011913 Firefox/3.0.6,gzip(gfe),gzip(gfe) > But why, when return stack grow up, is system slowing down ? > However Available memory are sufficient... Because the system has to keep track of each pointer from the SYS-RPL- ReturnStack and this \keeping track\ takes longer if there are more pointers to keep track off (uhh, what a sentence ;-) The same with the RPL Data stack ( aka \normal stack\ ): Put 5000 objects on the stack and you will notice how the whole calc slows down, even if there is a lot of free memory available. Again, because the system has to keep track of the pointers shown in the \normal stack\. HTH, Andreas http://www.software49g.gmxhome.de === Subject: Re: HP48 : recursion : more and more slower > > > But why, when return stack grow up, is system slowing down ? > > However Available memory are sufficient... > > Because the system has to keep track of each pointer from the SYS-RPL- > ReturnStack and this \keeping track\ takes longer if there are more > pointers to keep track off (uhh, what a sentence ;-) > > The same with the RPL Data stack ( aka \normal stack\ ): Put 5000 > objects on the stack and you will notice how the whole calc slows > down, even if there is a lot of free memory available. Again, because > the system has to keep track of the pointers shown in the \normal > stack\. > > HTH, > Andreas > http://www.software49g.gmxhome.de So, I've already another question : lol When in the process, hp48 is keeping track ? For exemple, if there are 5000 objects on data stack, we push the SWAP button : When is the 'keeping track' process running ? Is it an internal operation of RPL operating system, (Memory management etc..) or is it an internal system call in any command ? === Subject: Re: HP48 : recursion : more and more slower <499a8461$0$4057$ba4acef3@news.orange.fr> posting-account=57eBeAkAAABkNMhsZnDBzGQsstJRmvKD Gecko/2009011913 Firefox/3.0.6,gzip(gfe),gzip(gfe) > For exemple, if there are 5000 objects on > data stack, we push the SWAP button : > When is the 'keeping track' process running ? Everytime the memory changes. A SWAP exchanges stack pointer 1 with stack pointer 2. If you look into SWAP you see that the pointers are written into the CPU and from there into memory. So, memory changes, the system goes through all pointers (keeps track of all pointers) and the time needed for this depends on the number of pointers the system has to keep track off. If it runs out of memory it checks which memory areas (and maybe pointer to this) are no longer referenced and removes them from memory, this is know as Garbage Collection (but is an entire story of its own). After a GC there might be less pointers so the system might be faster... Hope I could enlighten the process a little bit. It is a little bit more complicated, but it should give you an overview of what is happening... JHM > What kind of \keeping track\? And this hopefully answered this question, too. Andreas http://www.software49g.gmxhome.de === Subject: Re: HP48 : recursion : more and more slower > A SWAP exchanges stack pointer 1 with stack pointer 2. > If you look into SWAP you see that the pointers are written into the > CPU and from there into memory. > So, memory changes, the system goes through all pointers (keeps track > of all pointers) and the time needed for this depends on the number of > pointers the system has to keep track of. I still don't follow the \goes through\ and \keeps track\ details here \ :) http://www.sciencecartoonsplus.com/pages/gallery.php Perhaps we should time a loop (FOR...NEXT) of some thousands of SWAPs, with different initial stack sizes, preceding each FOR by MEM DROP (to force a GC before starting). Having first disabled Last Stack, I have tried the following, on Emu48, simulating \Authentic calculator speed\ (of original 49G): 1. 5000. START RAND NEXT MEM DROP \\<< 1. 5000. START SWAP NEXT \\>> TEVAL Then I replaced the first line with just two numbers, and repeated the second line. The program in the second line took 16 seconds in either case. Well, in this particular case, the \keeping track\ of 5000 pointers, performed 5000 times, vs. only two pointers, performed 5000 times, made a difference of about zero, this particular keeping track may thus have been performed, off-line, by the all-knowing Mind of God, with no significant load on the CPU. Try on a real calculator as well, to make sure that Emu48 isn't cheating. If I take two calculators of different weight to the top of the Leaning \ Tower of Pisa, and drop them at the same time, with different numbers of items on their \ stacks, I wonder which will fall to the ground first? Engineering blunder, or engineering miracle? http://en.wikipedia.org/wiki/Leaning_Tower_of_Pisa Perhaps a lesson in hope for the reversal of so much global folly. [r->] [OFF] === Subject: Re: HP48 : recursion : more and more slower posting-account=KxEIGwoAAAALMxy6hykxLK1wPdiyuNkK Gecko/2009011913 Firefox/3.0.6,gzip(gfe),gzip(gfe) > > > A SWAP exchanges stack pointer 1 with stack pointer 2. > > If you look into SWAP you see that the pointers are written into the > > CPU and from there into memory. > > So, memory changes, the system goes through all pointers (keeps track > > of all pointers) and the time needed for this depends on the number of > > pointers the system has to keep track of. > > I still don't follow the \goes through\ and \keeps track\ details here \ :) > John is right. The stack is just an sequence of pointers. SWAP just exchanges the top two. Adding or dropping items from the stack just adds a new pointer and changes the register that points to the top of the stack. It doesn't move or even look at the rest of the stack. I'm aware of two, possibly three, times when the entire stack is scanned, garbage collection, moving an object in temporary memory (when all references to the object must be updated) and (possibly) setting up error processing (sorry, I can't recall the exact command here). In the latter case, the stack might be copied, I'm not sure. But in the recursive program, it was the RETURN stack that grows, not the data stack. So I'm thinking that it's the error processing and it's copying the return stack as well as the data stack. I believe that most SysRPL commands don't do error processing. Does one of the commands in the original program do it? Dave === Subject: Re: HP48 : recursion : more and more slower posting-account=57eBeAkAAABkNMhsZnDBzGQsstJRmvKD Gecko/2009011913 Firefox/3.0.6,gzip(gfe),gzip(gfe) > > A SWAP exchanges stack pointer 1 with stack pointer 2. > > If you look into SWAP you see that the pointers are written into the > > CPU and from there into memory. > > So, memory changes, the system goes through all pointers (keeps track > > of all pointers) and the time needed for this depends on the number of > > pointers the system has to keep track of. 1. My answers my contain errors as any answers given in this newsgroup. 2. SWAP is not the right example, my mistake. It does *not* alter the memory as it just read the values into the CPU and then overwrite the pointers for it, so you and JHM are right. (Of course I should have seen this when I said: Look into the code of SWAP.) > I still don't follow the \goes through\ and \keeps track\ details here :) > The stack is just an sequence of pointers. Of course, but these pointers \point\ somewhere. Either into ROM for built-in stuff or into TempOb. TempOp memory is organized as one continuously block of memory, there is no hole in it. Now if an object is added to TempOp it has to be extended and the pointers that are referencing inside TempOp are no longer valid. Also the memory before and after TempOp changes. So all pointer have to be adjusted (the system goes through all pointers and keeps track of them). And this, of course, takes longer if there are lots of pointers to keep track of (does not make a difference if these are \Stack\-Pointers or \RSTK\-Pointers (and SYS-RPL-ReturnStack pointers also do point somwhere in memory as the SYS-RPL-ReturnStack Again, put 5000 objects on the stack of a real calc and then try some memory operations, like adding a string on level1 (this string will be in TempOb and referenced through a pointer), try DEPTH ROLL with 5000 objects on the stack, etc. I am writing this from memory, but I know it is an issue as I investigating at that time which speed penalty arises from circumventing the infamous STO-Bug. As always, YMMV. Andreas http://www.software49g.gmxhome.de === Subject: Re: HP48 : recursion : more and more slower > TempOp memory is organized as one continuously block of memory, there > is no hole in it. Now if an object is added to TempOp it has to be > extended and the pointers that are referencing inside TempOp are > no longer valid. Also the memory before and after TempOp changes. > So all pointer have to be adjusted. The loop which stopped slowing down when COLA was inserted was creating a new temporary object each time, but hopefully not moving any existing temporary objects until the next GC -- are you asserting that every single addition, for example, moves all temp objects, requiring complete update of all pointers? That would make every single data operation (addition, for example, which always creates a new temporary object) cause a logjam of extra processing, which would not seem a very efficient design for the RPL system. I re-ran that previously posted loop (with COLA), for example, in Emu48, once with only one initial value on the stack, and again with 5000 random reals on the stack, and timed, with a stopwatch, how long it took for the displayed counter to advance by #100h (when not stalled by the occasional long GC): With one item on stack: 3.4 seconds With 5001 items on stack: 3.4 seconds What should we conclude now? [r->] [OFF] === Subject: Re: HP48 : recursion : more and more slower posting-account=eF2f0AoAAAB2spBRiZOs91ItDKLGDCIk Gecko/2008120122 Firefox/3.0.5,gzip(gfe),gzip(gfe) The Return Stack is sandwiched between the Temporary Memory and Free Memory. As a consequence, it has to move under two set of circumstances : - A new Temporary object is created, it is added at the end of Temporary Memory, and thus \push\ forward the entire Return Stack. - A Garbage Collector happens, all 'invalid' (i.e. not referenced) temporary objects are discarded from Temporary Memory, and as a consequence, subsequent objects are moved to fill the gap. The Return Stack is then \pulled\ to fill the final gap. Garbage collector is not frequent : it is either called explicitly (for example by using the UserRPL command \MEM\, or by using the SysRPL command \GARBAGE\), or as a consequence of lack of memory (typically when trying to allocate more space for a new Temporary object; if there is not enough Free Mem, a Garbage Collector is triggered). So, basically, the Return Stack moves each time there is a Memory Allocation operation. Memory Allocation happen all the time, it is difficult to precisely guess by how much without proper debugging tool (i.e. Debug4x, the best one so far). Most operation require some memory, for storing the results for example, this will move the Return stack, either forward or backward depending on \Free Memory\ still available. That's why having an ever expanding Return Stack is bound to have an impact on performances \at large\ of the calculator. Nearly every single operation will be significantly slowed down. On the other end, we've got another stack to consider, which is the Data Stack. This one is located on the end of the calculator. Data Stack & Return Stack sandwich the Free Memory, which is therefore occupying the \middle\ part of memory. Creating a temporary memory object will only moves the Return Stack, not the Data Stack. Free Mem is the real buffer here. Upper & Lower part of memory can move without affecting the other one. In fact, to know how much Free Mem is left, using Machine Code, you do a \Data Stack Pointer - RSTK\ operation. Data Stack can be as big as you want, this will have no impact on most operation performances. The situation is different if you want to save something into a Global Variable. Here you'll get about the same story as RSTK & TEMPOB, but this times involving the Data Stack and the relatively \stable\ memory containing all Global Variables. The following memory part will \move\ the Data part as a consequence of their own changes : CmdL, Loc, Lops, TpEv, Home and P0. Home is the most important one, as it holds Global Variables & Directory structure. Some of these parts are \de facto\ static, and most other does not change often. This part of memory is relatively stable compared to TEMPOB, hence the relatively \less\ impact of a large Data Stack, compared to having a large Return Stack. A complete view of the Memory map can be seen using the RPL debugguer of Debug4x, just expand the window to occupy the whole screen. You'll see a very precise & detailed map on the upper right. Having a look at it make all these stories a lot simpler to understand. === Subject: Re: HP48 : recursion : more and more slower Very good explanation by Yann! MOVERS[D/U] appears involved in moving Return Stack. Data Stack less frequently needs moving than Return Stack, thus supporting large amount of data and frequent generation of temporary objects with minimal overhead, while depth of \nested\ programs is typically modest (except in extreme case originally posted). Seems to confirm \Intelligent Design\ theory (at least as far as Bill Wickes and any other designers of RPL, who probably did not depend on random thought mutations :) Make use of COLA when indicated (the internal OS does :) [r->] [OFF] === Subject: Re: HP48 : recursion : more and more slower posting-account=KxEIGwoAAAALMxy6hykxLK1wPdiyuNkK Gecko/2009011913 Firefox/3.0.6,gzip(gfe),gzip(gfe) I think I have a good theory on what's going on. Please note that this all just a theory. For reference, here's an excerpt of the memory layout from the thread that Andreas qouted: +-------------------------------+ <-- TEMPOB | Temporary Objects | +-------------------------------+ <-- TEMPTOP | RPL Return Stack | +-------------------------------+ <-- RSKTOP | Free memory | +-------------------------------+ <-- DSKTOP | Data Stack | +-------------------------------+ <-- EDITLINE So the RPL return stack is sandwiched between TEMPOB and the data stack. I strongly suspect that the return stack can move, so there may be some free memory between TEMPOB and the return stack like so: +-------------------------------+ <-- TEMPOB | Temporary Objects | +-------------------------------+ <-- TEMPTOP | Free memory | +-------------------------------+ <- Bottom of return stack | RPL Return Stack | +-------------------------------+ <-- RSKTOP | Free memory | +-------------------------------+ <-- DSKTOP | Data Stack | +-------------------------------+ <-- EDITLINE This would make a lot of sense. Most of the time, you can add a TEMP object by just extending TEMPOB into the free space between it and the return stack. NO NEED TO ADJUST POINTERS. And the data stack extends into the free memory on the other side of the return stack. Now here's where it gets clever - the return stack can move. If you add an object to TEMPOB and it won't fit in the free space, then you can MOVE THE RETURN STACK DOWN. And if you add something to the data stack that bumps into the return stack then you MOVE THE RETURN STACK UP. Normally the return stack is fairly small, so this should be pretty quick. Of the three data structures (TEMPOB, data stack and return stack) the return stack is usually the smallest so it makes sense to put it between the other two and move it as needed. Now we come to the case at hand. Suppose you call and object and discover that there is no room to add an address to the top of the return stack. You move the return stack towards TEMPOB to make room. But how far do you move it? You don't want to move it all the way up because you'll probably have to move it back down again when the next temp object is created. So you move it part way. I don't know how much. So when the return stack grows really big, it keeps bumping up against the data stack and it has to be moved. The larger it gets, the longer it takes to move it. Dave === Subject: Re: HP48 : recursion : more and more slower > > So the RPL return stack is sandwiched between TEMPOB and the data > stack. I strongly suspect that the return stack can move, so there > may be some free memory between TEMPOB and the return stack like so: Wow ! Perfect :) I think you are right :) Because I experiment it on my SX (32ko), just see this program : Var. Name : Disp << \Return ST :\ #7056Fh 5 PEEK REVSTR + 2 DISP >> (REVSTR : Reverst String ) Var. Name : 'A' << DUP 1 DISP 1 + Disp A >> Run : 1 A [ENTER] Displays are : --------------------- 1 Return ST : #72212 --------------------- 2 Return ST : #726F5 --------------------- 3 Return ST : #72BD8 . . . --------------------- 24 Return ST : #79463 . . . --------------------- 39 Return ST : #7DF24 (Garbage Collector) --------------------- 40 Return ST : #71CEC --------------------- 41 Return ST : #72358 etc..... Obviously, Return Stack move on every recursion :) === Subject: Re: HP48 : recursion : more and more slower just a precision : Return Stack move always + #502h (1282 nibbles) === Subject: Re: HP48 : recursion : more and more slower Ooops, it's a mistake, depend surely on number of sub-sysRPL strucures runned between 2 recursions. I think that answer is in D9D20/B2130 prologs ... > just a precision : Return Stack move always + #502h (1282 nibbles) > === Subject: Re: HP48 : recursion : more and more slower > if there are 5000 objects on data stack, we push the SWAP button Pushing a button is different from just leaving a program running. If you have \Last stack\ enabled (for UNDO), a copy of the entire stack (5000 pointers) must be saved, in temporary memory, before SWAP is performed, which is yet another time consuming task. Of course, each saved stack replaces the previous one, except when a HALT intervenes, in which case each HALT level may contain its own saved stack. Big stacks slow Garbage Collection (GC), and slow any function which requires a check whether an object in temporary memory is \referenced\ by any stack pointer. Is it any wonder, when even a simple calculator presents challenges to our understanding, that things like gobal economy, ecology, climate, and all our affairs on Earth may not be so obvious as human hubris may \ assert? Let us proceed with sophrosyne, whatever that means :) http://en.wikipedia.org/wiki/Sophrosyne [r->] [OFF] === Subject: Re: HP48 : recursion : more and more slower >> But why, when return stack grow up, is system slowing down ? >> However Available memory are sufficient... > Because the system has to keep track of each pointer from the SYS-RPL- > ReturnStack and this \keeping track\ takes longer if there are more > pointers to keep track of What kind of \keeping track\? Besides just appending new pointers? Is there any \reference\ checking going on, other than during GC? [r->] [OFF] === Subject: Re: HP48 : recursion : more and more slower \stfox\ schrieb im Newsbeitrag > >> >> Insert COLA before ID A >> >> How now? >> >> [r->] [OFF] > > Ok, if I'm right, COLA drop on return stack before evaluating 'A', > Return Stack size don't increase, therefore slowing down disappears. > Have you actually tried it with COLA, or is it just a theoretical conclusion? > But why, when return stack grow up, is system slowing down ? > However Available memory are sufficient... Maybe you could try the debugger, then you'll see why the program slows down... === Subject: Re: HP48 : recursion : more and more slower > Have you actually tried it with COLA, > or is it just a theoretical conclusion? I tried it myself here; what happens over there? If results vary, maybe we can make a GPS out of this :) [r->] [OFF] === Subject: Re: HP48 : recursion : more and more slower posting-account=KxEIGwoAAAALMxy6hykxLK1wPdiyuNkK Gecko/2009011913 Firefox/3.0.6,gzip(gfe),gzip(gfe) > > why recursion are more and more slower ? > > For exemple : > > Var. name : 'A' > Stack : 1: <1h> > :: > Ê Ê DUP DO>STR DISPROW1 > Ê Ê ONE #+ > Ê Ê ID A > ; Are you sure the problem is recursion? If you code this as a loop instead of a recursive function, does it still slow down? I can't find any documentation on the memory layout. Perhaps the calculator moves the return stack when it starts to get large. That could slow things down. Is there bounds checking on the return stack? If not, then it's possible that you're just exceeding the memory allocated to it and things. If that's true, then the behavior is unpredictable (and might include a general slowdown). Finally, Raymond has a good point. If your program requires 500+ levels of recursion, then you might want to look at ways to change the algorithm to be less recursive. Good luck, and please post the solution when you figure it out. This is a good one! :) Dave === Subject: Re: HP48 : recursion : more and more slower >Are you sure the problem is recursion? If you code this as a loop >instead of a recursive function, does it still slow down? Yes, I'm sure, no problem with a loop ;) Anyone can experiment it. >I can't find any documentation on the memory layout. Perhaps the >calculator moves the return stack when it starts to get large. That >could slow things down. It's probably one of the reasons >Is there bounds checking on the return stack? If not, then it's >possible that you're just exceeding the memory allocated to it and >things. If that's true, then the behavior is unpredictable (and might >include a general slowdown). I'm not sure of having understood you, but it's reproducible in USER RPL, this mean reason is not a bug. stack : 1: 1 VAR. Name : 'A' << DUP 1 DISP 1 + A >> >Finally, Raymond has a good point. If your program requires 500+ >levels of recursion, then you might want to look at ways to change the >algorithm to be less recursive. It's not a program project, I just want to understand this curiosity. >Good luck, and please post the solution when you figure it out. This >is a good one! :) >Dave === Subject: Re: HP48 : recursion : more and more slower posting-account=MKOhFwoAAABYdbJu9wHqeFziRZVKXQQ9 Gecko/2009011913 Firefox/3.0.6,gzip(gfe),gzip(gfe) > > why recursion are more and more slower ? > > For exemple : > > Var. name : 'A' > Stack : 1: <1h> > :: > Ê Ê DUP DO>STR DISPROW1 > Ê Ê ONE #+ > Ê Ê ID A > ; Because you keep using more and more memory... Arnaud === Subject: Re: HP48 : recursion : more and more slower >Because you keep using more and more memory... > >Arnaud I'm not sure, because recursion with 10ko of free memory have the same performance than a recursion with 150ko of free memory. (Of course, number of recursion will be limited by available memory) I test this code with 150ko of free memory, and after only 500 recursions, (and always ~150ko of free memory), execution are slowing down. There is a processing relating to Return stack size, but which ? === Subject: Re: HP48 : recursion : more and more slower >\Arnaud Amiel\ schrieb im Newsbeitrag >> >> why recursion are more and more slower ? >> For exemple : >> Var. name : 'A' >> Stack : 1: <1h> >> :: DUP DO>STR DISPROW1 ONE #+ ID A ; > >Because you keep using more and more memory... > And additionally, many recursions can be \flattened\, or in other words: Transformed to simple loops, like your example;-) And another reason: ID name resolution is relatively slow... HTH Raymond === Subject: RPN/RPL Calculator implementations, list of, regular post [long, \ FAQ] Supersedes: Last-Modified: 2009-02-16 Posting-Frequency: bi-monthly URL: http://www.finseth.com/rpnrpl.html Copyright: 2002-9 by Craig A. Finseth Archive-name: computer/handhelds/rpn-rpl Disclaimer: Approval for *.answers is based on form, not content. RPN/RPL Implementations Document id RPN/RPL Implementations http://www.finseth.com/rpnrpl.html Last posted 2009-02-16 reposted about every 2 months Contact: Craig A. Finseth http://www.finseth.com. Please send updates directly to the author via email. Copyright This FAQ document is Copyright 2002-8 by Craig A. Finseth. It may be reproduced and archived as part of normal network distribution. Such distribution is assumed to include CD/ROM or \ other bulk, unedited distribution. It may be reproduced for individual or non-commerical use provided that it is reproduced intact. It may be reproduced for commercial use provided: o it is reproduced essentially intact including all copyright notices and acknowledgements, o the publisher obtains the latest version directly from the FAQ maintainer (using the above WWW site is acceptable), o the publisher provides the FAQ maintainer with information on what collection the copy of the FAQ is in, and how that collection may be obtained, o all material modifications (other than formatting) are clearly marked. Description This document provides a list of implementations of RPN, RPL, and HP calculators for other systems. You can help make it more comprehensive by sending me additional information and/or updates. To be included in this list, an implementation must: o implement at least a \standard\ 4-level RPN calculator. Minor variations (e.g., 3 or 5 levels) do not preclude being listed. Implementations that include both RPN and algebraic modes are eligible. o implement an RPL calculator. o implement a \clone\ (or near-clone) of any Hewlett-Packard calculator, even if it is an algebraic-only model. The following information is included for each implementation: Implementations are listed alphabetically by name. If the implementation emulates or approximates a specific calculator and it is not obvious from the name which calculator is emulated, the emulated calculator model is given in parentheses. The *LAST* *CHANGED/VERIFIED* line contains the date that the entry was last changed or an explict \looks ok to me\ was \ received by the FAQ maintainer. The *ORIGINAL* *DISTRIBUTION* is the date (or partial date) of the first release. It is in YYYY-MM-DD format. The *VERSION* is the latest known version. It is probably out of date. The *ENVIRONMENT* is the operating environment. This is a very high-level description: consult the documentation on the product for any specifics. The *ORGANIZATION* is the name of and contact information for the implementor or current maintainer. The *STATUS* is one of o no longer available: Self-explanatory. o free: The implementation is available to most people at no charge. Even such \free\ implementations may have \ restrictions: consult information about the particular implementation. Where available, information on how to obtain a copy is also listed. o shareware: Self-explanatory. o not free: The implementation is for sale. Contact the vendor for specifics. Many of the names of the implementations in this list are trademarked. Specific trademarks are not called out. The site http://www.hp41.org also has a list. Table of Contents Implementations Available for PCs: Linux, DOS, Windows, Macintosh, Unix Calc41 name: Calc41 last changed/verified: 2002-10-21 version: ? environment: Windows organization/author: ? status: not free Note: was sold by EduCALC. Calculator.org name: Calculator.org / Calc 98 last changed/verified: 2008-03-06 version: 5.6 environment: Windows, web, handhelds organization/author: http://calculator.org status: free Emu28 name: Emu28 (includes 28C) version: 1.03 environment: Windows organization/author: Christoph Giesselink http://privat.swol.de/ChristophGiesselink/emu28.htm status: free EMU42 name: EMU42 version: 0.10beta1 environment: Windows organization/author: Christoph Giesselink \ http://privat.swol.de/ChristophGiesselink/Lewis/Hp42demo.zip \ http://w1.322.telia.com/~u32220482/comments_on_two_hp42s_emulators.pdf status: free Emu48 name: Emu48 (includes 38G, 39G, 40G, 48SX, 48GX, 49G) version: 1.34 environment: Windows organization/author: Christoph Giesselink http://privat.swol.de/ChristophGiesselink/. status: free Emu48 name: Emu48 last changed/verified: 2002-10-21 version: ? environment: Windows organization/author: Sebastien Carlier status: free Free42 name: Free42 (HP42S) last changed/verified: 2008-02-19 version: 1.1.13 environment: Linux and Windows organization/author: Thomas Okken http://home.planet.nl/~demun000/thomas_projects/free42 http://free42.sourceforge.net/42progs/index.html status: free Note: Palm and Pocket PC versions also available. HP Emulator name: HP Emulator (48GX) last changed/verified: 2002-10-29 version: 0.9.0 environment: Windows organization/author: Daniel Nilsson http://sourceforge.net/projects/hpemu status: free HP10BII Emulator name: HP10BII Emulator (48GX) version: ? environment: Windows organization/author: ? http://www.hpcc.org/links.html status: free HP-11C name: HP-11C last changed/verified: 2005-11-11 version: 1.0.7 environment: Windows organization/author: Henk von Pickartz http://boswachter.free.fr/Kalk http://www.hp16c.com status: not free HP-12C name: HP-12C version: ? environment: Windows / Macintosh organization/author: http://www.manquehue.net/rlira status: not free HP-12C name: HP-12C version: ? environment: Windows / Macintosh organization/author: http://homepage.mac.com/riclira status: not free HP-16C name: HP-16C last changed/verified: 2002-10-21 version: ? environment: Windows organization/author: Joseph M. Newcomer Co. http://www.pgh.net/~newcomer/hp16c.htm status: free Note: Palm version also available. HP-16C name: HP-16C version: preview environment: Java organization/author: Alexander Supalov supalov@foni.net http://home.foni.net/~supalov/hp16c status: free Note: It's available for online preview at http://home.foni.net/~supalov/hp16c . It's implemented using Swing, so that you may need to add Sun's Java plugin at http://java.sun.com/plugin to get it up and running. This is an ongoing effort, and there's a number of limitations to this emulator that we are well aware of, but there may be some that we've missed. Please bear with us: all constructive feedback will be highly appreciated. HP16 Emulator name: HP-16C Emulator last changed/verified: 2005-08-19 version: ? environment: Windows organization/author: Jamie O'Connell http://www.hp16c.net status: ? HP-25 Emulator name: HP-25 Emulator last changed/verified: 2002-10-21 version: ? environment: DOS organization/author: Nigel Bromley \ http://dspace.dial.pipex.com/town/square/gd86/freesoft.htm status: free HP-35A Emulator name: HP-35A version: ? environment: XWindows, Unix organization/author: Peter Monta http://www.pmonta.com/calculators/hp-35/ status: free HP-41C Emulator name: HP-41C Emulator last changed/verified: 2002-10-21 version: ? environment: Windows organization/author: Warren Furlow http://www.furlow.org status: free HP-41C Emulator name: HP-41C Emulator (Sim41?) last changed/verified: 2002-10-21 version: ? environment: DOS organization/author: Alvaro Gerardo Suárez http://www.geocities.com/SiliconValley/Bay/4919/ http://geocities.com/algesuar status: free HP-41C, HP-45 Emulators name: HP-41C, HP-45 Emulators last changed/verified: 2002-10-21 version: ? environment: XWindows, Unix organization/author: Eric Smith http://www.brouhaha.com/~eric/hpcalc/ status: free HP-41C, HP-71B Emulators name: HP-41C, HP-71B Emulators version: ? environment: DOS organization/author: J. Garnier http://membres.lycos.fr/jeffcalc/ status: free HP-41C/CV/CX MicroCode Emulator name: HP-41C/CV/CX MicroCode Emulator version: 1.02 environment: Windows organization/author: http://www.hpcalc.org/hp48/pc/emulators/hp41epc.zip status: free HP-55A Emulator name: HP-55A Emulator version: ? environment: XWindows, Unix organization/author: Eric Smith http://www.brouhaha.com/~eric/hpcalc/ status: free HP-67 Simulator name: HP-67 Simulator last changed/verified: 2002-10-21 version: ? environment: Unix, Apple GS organization/author: Christopher Neufeld \ http://caliban.physics.utoronto.ca/neufeld/hp67/hp67.html status: free hpcalc.org name: hpcalc.org (web site, many models) last changed/verified: 2005-02-23 version: N/A environment: various organization/author: http://www.hpcalc.org/hp49/pc/emulators/ http://www.hpcalc.org/hp49/pc/programming/ status: free Note: this site has many emulators and variations. IQ-15C name: IQ-15C last changed/verified: 2006-10-19 version: N/A environment: tcl (runs anywhere tcl runs) organization/author: Torsten Manz' original version: http://www.hpmuseum.org/simulate/15_1_201.zip Larry Smith modified it to not require installing a \ font: http://www.smith-house.org:8000/IQ-15C status: free Loki and LokiBin name: Loki and LokiBin last changed/verified: 2002-10-21 version: 1.0 environment: many organization/author: Craig Finseth http://www.finseth.com/#Loki status: free Note: Several implementations, including: command-line for Windows, Macintosh OS X, and Unix; system manager versions for HP95LX, HP100*, and HP200*; native GUI for Windows, Macintosh OS 8+ and OS X. Loki is a 4-function RPN calculator that does fractional input and output and units. LokiBin is a 4-function RPN calculator that does binary / octal / hex transformation and math. MPCalcRB name: MPCalcRB last changed/verified: 2008-04-14 version: ? environment: Macintosh, Linux, Windows organization/author: http://homepage.mac.com/delaneyrm/MPCalcRB.html status: free Nonpareil name: Nonpareil (many, many) last changed/verified: 2005-06-16 version: ? environment: Linux organization/author: http://nonpareil.brouhaha.com status: free Orpie name: Orpie last changed/verified: 2007-09-15 version: 1.5.1 environment: Unix/OCaml organization/author: Paul Pelzl http://www.eecs.umich.edu/~pelzlpj/orpie/ status: free PCalc name: PCalc last changed/verified: 2008-21-10 version: 1.0.2 environment: iPhone organization/author: TLA Systems http://www.tla-systems.co.uk/ status: not free PCALC name: PCALC last changed/verified: 2006-01-09 version: 3.0.2 environment: Macintosh organization/author: http://www.pcalc.com status: not free Pscalc95 name: Pscalc95 (HP-28ish) version: ? environment: HP95 and similar organization/author: http://ftp.monash.edu.au/pub/palmtop/pscalc.lzh status: free rpn name: rpn (HP42S) last changed/verified: 2005-08-15 version: BashDiff-1.29 environment: GNU Bash shell organization/author: William Park http://home.eol.ca/~parkw/index.html#bashdiff http://freshmeat.net/projects/bashdiff/ status: free (GPL) RPN Calculator name: RPN Calculator last changed/verified: 2008-03-06 version: 1.96 environment: Macintosh, Windows organization/author: http://www.rpncalculator.net/ status: not free RPL/2 name: RPL/2 (?) version: ? environment: ? organization/author: http://www.makalis.fr/~bertrand/rpl2 status: free RPN Calculator name: RPN Calculator last changed/verified: 2006-03-01 version: ? environment: Macintosh organization/author: http://www.macforth.com/downloads.html status: free Ttcalc name: Ttcalc (HP-41C) last changed/verified: 2002-10-21 version: 1.3? environment: Windows organization/author: Stefan Seiwerth, mailto:Seiwerth@aol.com http://www.hpmuseum.org/simulate/simulate.htm \ http://www.tu-chemnitz.de/ftp-home/pub/cica-win3/desktop/ttbcalc13.zip status: free WRPN name: WRPN (HP-16C) last changed/verified: 2002-10-21 version: ? environment: Windows organization/author: Emmet P. Gray, mailto:GrayE@hood-emh3.army.mil http://www.hpmuseum.org/simulate/simulate.htm status: free X48 name: X48 (HP48GX) version: 1.2 of the port, 0.4.1 of the original emulator environment: Macintosh organization/author: Markus Fritze http:www.markus-fritze.de status: free XCALC name: XCALC last changed/verified: 2005-08-15 version: 2.6.3 environment: Windows organization/author: Bernt Ribbum http://www.tordivel.no/xcalc/ status: free Note: XCALC 2.6.3 performs calculations in the RPN style using a multi-level stack. The stack size defaults to 4 levels but can be changed by the user. This calculator has 10 storage registers and computes both in complex and real mode. There is also a binary mode available. Visit the website for a more complete description. Xxxx name: Xxxx version: ? environment: Windows (probably) organization/author: Craig Pearce status: free Said to emulate an \HP style RPN calculator.\ Written in Visual Basic. HP Calculators Emulating Other HP Calculators HP-41C/CV/CX MicroCode Emulator v1.15 for HP-48S/SX/G/G+/GX name: HP-41C/CV/CX MicroCode Emulator version: 1.15 environment: HP-48S/SX/G/G+/GX organization/author: http://www.hpcalc.org/hp48/apps/misc/hp41e48.zip status: free HP-41C/CV/CX MicroCode Emulator v1.15 for HP-49G name: HP-41C/CV/CX MicroCode Emulator version: 1.15 environment: HP4/9G organization/author: http://www.hpcalc.org/hp49/apps/misc/hp41e49.zip status: free HP-41X MicroCode Emulator name: HP-41X MicroCode Emulator for HP48GX/49G version: ? environment: HP48/9 Series organization/author: http://hrastprogrammer.tripod.com/HP41X/index.htm status: not free HP42X MicroCode Emulator name: HP42X MicroCode Emulator for HP48GX/49G version: ? environment: HP48/9 Series organization/author: http://hrastprogrammer.tripod.com/HP42X/index.htm status: not free HP-71X MicroCode Emulator name: HP-71X MicroCode Emulator for HP48GX/49G version: ? environment: HP48/9 Series organization/author: http://hrastprogrammer.tripod.com/HP71X/index.htm status: not free HP-IL Emulation for HP-41X name: HP-IL Emulation for HP-41X version: ? environment: ? organization/author: http://hrastprogrammer.tripod.com/HP41L/index.htm status: not free HP-IL Emulation for HP-71X name: HP-IL Emulation for HP-71X version: ? environment: ? organization/author: http://hrastprogrammer.tripod.com/HP71L/index.htm status: not free Implementations Available For Palm Systems Coconut name: Coconut (HP-41C) last changed/verified: 2002-10-21 version: 3.0.3 environment: Palm organization/author: ? status: both free and not free Free42 name: Free42 (HP42S) last changed/verified: 2005-02-18 version: 1.1.13 environment: Palm organization/author: Thomas Okken http://home.planet.nl/~demun000/thomas_projects/free42 status: free Note: Linux and Windows versions also available. HP-16C name: HP-16C last changed/verified: 2002-10-21 version: ? environment: Palm organization/author: Joseph M. Newcomer Co. http://www.pgh.net/~newcomer/hp16c.htm status: free Note: Windows version also available. Kalc name: Kalc last changed/verified: 2002-10-21 version: 3.0.3 environment: Palm organization/author: ? status: free MathU name: MathU last changed/verified: 2002-10-21 version: ? environment: Palm organization/author: ? status: not free Note: related to MathU Pro and PalmCalc. MathU Pro name: MathU Pro last changed/verified: 2002-10-21 version: ? environment: Palm organization/author: ? status: not free Note: related to MathU and PalmCalc. NeoCal name: NeoCal last changed/verified: 2002-10-21 version: 1.5 environment: Palm organization/author: ? status: not free P41CV name: P41CV last changed/verified: 2006-05-15 version: 0.11 environment: Palm organization/author: Charles Lee and Eric Smith status: not free (only $7, though) Palm16c name: Palm16c (HP-16C) last changed/verified: 2002-10-21 version: ? environment: Palm organization/author: Jake Schwartz status: not free PalmCalc name: PalmCalc last changed/verified: 2002-10-21 version: ? environment: Palm organization/author: ? status: not free Note: related to MathU and MathU Pro. PowerOne name: PowerOne last changed/verified: 2002-10-21 version: ? environment: Palm organization/author: ? status: not free Note: The \finance\ version is the only one offering RPN. RPN name: RPN last changed/verified: 2002-10-21 version: 3.04 environment: Palm organization/author: http://www.palmgear.com status: not free RPN Calculator 1.0.1 name: RPN last changed/verified: 2002-10-21 version: 1.0.1 environment: Palm organization/author: ? status: free RPN2 name: RPN2 last Changed/verified: 2006-01-27 version: 2.0.1 environment: Palm organization/author: Richard Walker http://bojne.homelinux.net/rpn2.html status: free Implementations Available for Psion Systems DCalc name: DCalc (RPN) version: ? environment: Psion organization/author: Bob Hepple http://sedumi.freeshell.org/psion/index.html PocketIQ status: shareware Multifunction RPN Calculator name: Multifunction RPN Calculator (HP-16Cish) version: ? environment: Psion organization/author: Derek Johnson http://www.freeuk.net/decca status: shareware Psion48 name: Psion48 (similar to HP48SX) version: 2.1 environment: Psion organization/author: Xavier Galante http://Psion48.free.fr status: shareware Implementations Available for Texas Instruments Calculators RPN Calc name: RPN Calc version: 1.01 environment: TI-89 organization/author: Thomas Vino tomasvino yahoo.es \ http://www.ticalc.org/archives/files/fileinfo/103/10381.html status: free RPN Interface name: RPN Interface version: 2.022 environment: TI-89, TI-92+ organization/author: Lars Frederiksen http://www.paxm.org/symbulator/download/rpn.html status: free Implementations Available for Windows CE Systems EMU48CE name: EMU48CE version: 1.23 Release 2 environment: PocketPC organization/author: Leopoldo Bueno Castillo http://web.jet.es/leobueno/soft/emu48ce.exe status: free EMU48CE name: EMU48CE version: 1.23f organization/author: Pete M. Wilson http://scw.us/ce/emu48/emu48.exe status: free HP-41C Emulator name: HP-41C Emulator last changed/verified: 2002-10-21 version: ? environment: WindowsCE organization/author: Warren Furlow http://www.furlow.org status: free Loki and LokiBin name: Loki and LokiBin last changed/verified: 2002-10-21 version: 1.0 environment: JavaScript organization/author: Craig Finseth http://www.finseth.com/#Loki status: free Note: JavaScript implementation tuned for Windows CE implementation and screen size. Loki is a basic RPN machine and LokiBin does binary/octal/hex transforms and math. Pocket 12C name: Pocket 12C version: 1.5 environment: PocketPC organization/author: Lygea http://www.lygea.com/Pocket12C/V150/Pocket12CV150.exe status: not free Pocket 15C name: Pocket 15C version: 1.1 environment: PocketPC organization/author: Lygea http://www.lygea.com/Pocket15C/V110/Pocket15CV110.exe status: not free Pocket 16C name: Pocket 16C version: 1.0 environment: PocketPC organization/author: Pirrama (Lygea) http://www.pirrama.com/Pocket16C/V100/Pocket16CV100.exe status: not free Implementations Available for Other Systems (may include some of the above) Calc name: RPN last changed/verified: 2005-06-27 version: 2.03 environment: Java, cell phones organization/author: Roar Lauritzsen http://midp-calc.sourceforge.net status: free HP 45 name: HP 45 last changed/verified: 2008-10-17 version: 2.0(1) environment: JavaME, Smartphones organization/author: \Martin Krischik\ http://uiq3.sourceforge.net/wiki/index.php/Office/HP45 status: free Power48 name: Power48 version: 2.0 environment: various organization/author: Robert Hildinger http://power48.mobilevoodoo.com/ status: free PSPX48 name: PSPX48 last changed/verified: 2006-04-05 version: 1.0.3 environment: PSP organization/author: http://zx81.zx81.free.fr/serendipity/ status: free Implementations Available for the Web CoCalc, CoCalc2 name: CoCalc CoCalc2 last changed/verified: 2002-10-21 version: ? environment: Java organization/author: http://www.cohort.com/ status: free HP-16C name: HP-16C last changed/verified: 2005-08-19 version: ? environment: Java organization/author: Chris Lusko http://www.hp16c.com status: ? HP-25 name: HP-25 last changed/verified: 2002-10-21 version: ? environment: Java organization/author: Larry Leinweber, mailto:larry@leinweb.com http://www.hpmuseum.org/simulate/simulate.htm status: free HP-35 Simulation name: HP-35 Simulation version: ? environment: JavaScript organization/author: Neil Fraser http://neil.fraser.name/software/hp-35/ status: free HP-45 Microcode Simulator name: HP-45 Microcode Simulator last changed/verified: 2002-10-21 version: ? environment: Java organization/author: Eric Smith http://www.hpmuseum.org/simulate/simulate.htm status: free Loki and LokiBin name: Loki and LokiBin last changed/verified: 2002-10-21 version: 1.0 environment: JavaScript organization/author: Craig Finseth http://www.finseth.com/#Loki status: free End === Subject: Re: HP 50g keyboard layout > You have to really REALLY want to keep a calculator if you don't pack > it up and return it in disgust because the manual doesn't tell you > how to add 2+2 until page 50. Completely unfair and impractical. It takes much more preliminary knowledge to fly a plane than to peddle a tricycle, no matter how short the trip. If you've bought a complex calculator to do complex work, you need to get a bit oriented before you can sensibly do anything. There are no instructions for \how to add 2+2\ which will even work, for example, no matter what mode the calculator starts in (think ALG vs RPN). If I try to calculate the square root of two, \right out of the box,\ all I can get is a square root symbol, in front of the number 2, so what kind of useless calculator is that? Better go get a \four-banger,\ which you can match up with exactly the kind of manual you want -- start right out with 2+2=, add a few more examples, and that's all there is. What about a person who only wants to make graphs? Should Chapter 1 start right out with the GUI for graphing (which is all via GUI, it so happens)? What about people who only want to do symbolic algebra and calculus? Perhaps Chapter 1 should start with examples for them, instead of either for people who should have bought a four-banger, or who only want to do graphing? No matter what you start with, someone else's primary interest will be buried behind 50 pages of other stuff, so your original complaint will remain, no matter what manual is ever produced, even though I'm sure it's possible to create a superbly fine manual, save only that it would be for a calculator that itself needs a major re-design. > There is no GUI, only the manuals. GUIs arrived in this series with the 48G, around 1993; unfortunately, there isn't a \main\ GUI to lead to everything else, but APPS is a meager start. [r->] [OFF] === Subject: Re: HP 50g keyboard layout posting-account=KxEIGwoAAAALMxy6hykxLK1wPdiyuNkK Gecko/2009011913 Firefox/3.0.6,gzip(gfe),gzip(gfe) > It takes much more preliminary knowledge to fly a plane > than to peddle a tricycle, no matter how short the trip. The analogy doesn't hold for a calculator. It takes very little knowledge to take a square root, while it takes much more to solve multiple simultaneous equations or understand symbolic algebraic expressions. You should be able to do the little things with little knowledge. > If you've bought a complex calculator to do complex work, > you need to get a bit oriented before you can sensibly do anything. > > What about a person who only wants to make graphs? > Should Chapter 1 start right out with the GUI for graphing > (which is all via GUI, it so happens)? > > What about people who only want to do symbolic algebra and calculus? > Perhaps Chapter 1 should start with examples for them, > instead of either for people who should have bought > a four-banger, or who only want to do graphing? What I'm saying is that the manuals should start out with the basics and work up from there. Come to think of it, I think you're saying exactly the same thing :) . I believe that the manual in the box should be written for a new user and should take the user through the calculator in a logic progression, where each step builds on the next (or at least says \we'll talk about this later, for now just do it\). At each step, you want the reader to think \oh I get it. That makes sense. This is easy.\ There's a great book by Steve Krugg called \Don't Make Me Think\ (http://www.amazon.com/Think-Common-Sense-Approach-Usability/dp/ 0789723107) that talks about this in the context of web design. He argues that each time the user is puzzled or confused, there's a good chance that they'll just go somewhere else that doesn't confuse them. I believe it really IS possible to write a manual that will instruct a brand new user in how to operate the calculator without requiring that they have a huge amount of knowledge right away. That by having them put the calculator in approximate mode (that's one of those \we'll come back to this, just do it\ things). Then work through the 4- banger and scientific calculations. That's easy. \Now here's the alpha keyboard and here's how you store and recall variables.\ I get it. \Hey, you can even have directories and there's this thing called the filer.\ Well that makes sense. \Now here are the scientific functions. The Mode menu lets you change Degrees/Radians/Grads\. Nice. \By the way, you can change display modes too.\ Somewhere along the way there, I'd introduce RPN and praise its virtues. there you can go into the higher level functions. This sort of progression would be easily understood by anyone, even a 14-year-old who's never seen anything but a 4-banger. By the way, I think that 14-year-old is a prime customer. > > No matter what you start with, someone else's primary interest > will be buried behind 50 pages of other stuff, > so your original complaint will remain, > no matter what manual is ever produced, > even though I'm sure it's possible to create a superbly fine manual, > save only that it would be for a calculator that itself > needs a major re-design. I'm not saying that my *primary* interest should be first. I'm saying that it should cover the simple, understandable basics first and build up from there. This can be done with the existing calculator, there's no redesign required. > > > There is no GUI, only the manuals. > > GUIs arrived in this series with the 48G, around 1993; > unfortunately, there isn't a \main\ GUI to lead to everything else, > but APPS is a meager start. I should not have said GUI. I apologize. What I meant was a GUI *help* system. You're original point was that no one reads manuals any more and I'm saying that your point is only true when the device has good online help. The CAS help system is a handy reminder, but the calculator itself doesn't contain enough information to teach one how to use it. The APPS menu is a wonderful start if you ask me. Finally, let me say that I really love the 50g. Dave > > [r->] [OFF] === Subject: Re: HP 50g keyboard layout === Subject: Re: Projectile Motion Problem and HP solver > One of my students came to me the other day to help him solve > a projectile motion problem in Physics... > I thought I would save time and use the built in Projectile Motion > solver in the Equation Library in my HP48GX. > However when I plugged in the values given above for Vo, Xo,Yo, > Yfinal,and theta, the solver gave me a negative value for the time > and a negative value for X. Quite possibly because of left-over, uncleared variable values, from the previous solution, as in these similar discussions: Best wishes (with Eudora, too :) [r->] [OFF] === Subject: Re: Projectile Motion Problem and HP solver By the way, even the \negative\ solution for time and position is valid; it represents where and when a gun might have been fired, which could result in the projectile being right where it was, and headed where it was, when released from the plane, after which it continues, returning back to Earth at a later time and place, having traveled a complete parabolic path. Given sufficient velocity, and more correct equations representing the actual Earth as gravitational attractor, one would even have a trajectory of an indefinite elliptical orbit, which is what happened on 31 January 1958, when a computation of trajectory for a \routine\ rocket firing from the USA failed to compute any point of impact, much surprising many who did not know that this particular firing was a secret attempt to get something into \ orbit, to counter the Soviet Union's earlier Sputnik. http://inventors.about.com/od/sstartinventions/ss/Satellite.htm http://space.about.com/od/spaceexplorationhistory/p/explorer1.htm The \projectile\ equations of even the \flat Earth\ Equation Library, however, always represent more possibilities, all perfectly valid, for the total trajectory of a projectile, without prejudicially favoring just that portion of a total trajectory which we may have in mind. The \arrow of time,\ which we'd like to go only forward from the present moment, to agree with aspects of our personal experience, can nowhere be found in Classical Physics, and we would have to introduce \biasing\ terms into our equations to prevent them from projecting time in either direction, with equal \ validity. There is no doubt always more to the entirety of things than the limited range of our experience yet discloses, so an mind open to all possibilities can always be useful. [r->] [OFF] === Subject: Re: Projectile Motion Problem and HP solver posting-account=KxEIGwoAAAALMxy6hykxLK1wPdiyuNkK Gecko/2009011913 Firefox/3.0.6,gzip(gfe),gzip(gfe) > Ê Ê ÊOne of my students came to me \ the other day to help him solve a > projectile motion problem in Physics by Cutnell and Johnson > (7th Edition) Problem Ê3-21 > A jet is flying at 315m/s at an angle of +15 degrees with the > horizontal Êat an altitude of 2000m when it releases it \ auxiliary fuel > tank. How far will the fuel tank travel in the +X direction before it > hits the ground and what will it's velocity be.( also give X and Y > components of the final velocity as it hits the ground.)( Neglect air > friction) > Now assume the jet is flying at an angle of -15 degrees with the > horizontal and solve the problem again. I'm able to solve the first problem on my 50g (ROM 2.09) without a problem. With the calculator set to degrees mode, I enter X0=0. Y0=2000. Theta0=15*pi/180, V0=315. and Y=0. Solving for t gives 20.34s. Dave === Subject: Re: Projectile Motion Problem and HP solver > >> One of my students came to me the other day to help him solve a >> projectile motion problem in Physics by Cutnell and Johnson >> (7th Edition) Problem 3-21 >> A jet is flying at 315m/s at an angle of +15 degrees with the >> horizontal at an altitude of 2000m when it releases it auxiliary fuel >> tank. How far will the fuel tank travel in the +X direction before it >> hits the ground and what will it's velocity be.( also give X and Y >> components of the final velocity as it hits the ground.)( Neglect air >> friction) >> Now assume the jet is flying at an angle of -15 degrees with the >> horizontal and solve the problem again. >> I thought I would save time and use the built in Projectile Motion >> solver in the Equation Library in my HP48GX. >> However when I plugged in the values given above for Vo, Xo,Yo, >> Yfinal,and theta, the solver gave me a negative value for the time and >> a negative value for X. >> Any idea as to what is going on? I tried the same thing on my HP50G >> and I got the same results. >> I then used the polynomial solver to solve for the time of flight in >> the Y directiom using 1/2gt^2-Voyt-Yo=0 and got the time of flight. >> Then I plugged this value into the PM solver for t along with the rest >> of the variables listed above and it solved for X correctly. >> Again what is going on? > >The quadratic has two solutions, and the equation library solver happens >to give you the other one by default. ;-) > >You can get the other one by entering an initial guess for t that's >closer to the value you want (say, 100 seconds). Enter 100 for t before >solving for it. For more details, see pages 18-6 through 18-8 in the >user guide (the section on SOLVR). > >When I do this, I get t=30.15 seconds. After doing this, you also get >the corresponding positive solutions for x, vx, vy, etc when you solve >for them. > > >> Harold-Cimer@utc.edu > >Typo in your sig? What you say is true. What I am trying to figure out is why in the jet problem the SOLVER gives the negative root without a guess for the time and in the problem from my projectile motion lab it gives the correct positive root, with out having to make a guess for the time of flight.. I will read over the section in the manual you refer too. Harold A Climer Dept. Of Physics Geology, and Astronomy U.T, Chattanooga Rm. 406A Engineering, Math & Computer Science Building 615 McCallie Ave. Chattanooga TN 37403 Harold-Cimer@utc.edu === Subject: Re: Projectile Motion Problem and HP solver posting-account=nPsj8gkAAABiHzBXYOZBI1NgnWG3Vtdc 1.1.4322; .NET CLR 2.0.50727),gzip(gfe),gzip(gfe) > > > > > > > >> Ê Ê ÊOne of my students came to \ me the other day to help him solve a > >> projectile motion problem in Physics by Cutnell and Johnson > >> (7th Edition) Problem Ê3-21 > >> A jet is flying at 315m/s at an angle of +15 degrees with the > >> horizontal Êat an altitude of 2000m when it releases it \ auxiliary fuel > >> tank. How far will the fuel tank travel in the +X direction before it > >> hits the ground and what will it's velocity be.( also give X and Y > >> components of the final velocity as it hits the ground.)( Neglect air > >> friction) > >> Now assume the jet is flying at an angle of -15 degrees with the > >> horizontal and solve the problem again. > >> I thought I would save time and use the built in Projectile Motion > >> solver in the Equation Library in my HP48GX. > >> However when I plugged in the values given above for Vo, Xo,Yo, > >> Yfinal,and theta, the solver gave me a negative value for the time and > >> a negative value for X. > >> Ê Any idea as to what is going on? I tried the same thing \ on my HP50G > >> and I got the same results. > >> I then used the polynomial solver to solve for the time of flight in > >> the Y directiom using 1/2gt^2-Voyt-Yo=0 and got the time of flight. > >> Then I plugged this value into the PM solver for t along with the rest > >> of the variables listed above and it solved for X correctly. > >> Again what is going on? > > >The quadratic has two solutions, and the equation library solver happens > >to give you the other one by default. ;-) > > >You can get the other one by entering an initial guess for t that's > >closer to the value you want (say, 100 seconds). ÊEnter 100 \ for t before > >solving for it. ÊFor more details, see pages 18-6 through \ 18-8 in the > >user guide (the section on SOLVR). Ê > > >When I do this, I get t=30.15 seconds. ÊAfter doing this, \ you also get > >the corresponding positive solutions for x, vx, vy, etc when you solve > >for them. > > > >> Harold-Ci...@utc.edu > > >Typo in your sig? > > Ê What you say is true. What I am trying to figure out is why \ in the > jet problem the SOLVER gives the negative root without a guess for the > time and in the problem from my projectile motion lab it gives the > correct positive root, with out having to make a guess for the time of > flight.. > I will read over the section in the manual you refer too. > Harold A Climer > Dept. Of Physics Geology, and Astronomy > U.T, Chattanooga > Rm. 406A Engineering, Math & Computer Science Building > 615 McCallie Ave. Chattanooga TN 37403 > Harold-Ci...@utc.edu- Hide quoted text - > > - Show quoted text - Without knowing much about the projectile motion software on the computer you are using, I would guess that it would default to positive values of time. I remember projectile motion being pretty close to the beginning of my physics journey; me and most of my classmates would not have known what to make of negative values for time. I have not really dug into the equation library on the calculator, so I don't really know much about that either. I am guessing that the caluator is just implementing the numeric solver that it already has built in without making any assumptions (besides a generic initial x) about what the user wants for an answer. It's easy to change, and the calculator leaves that decision to the user. === Subject: Re: Projectile Motion Problem and HP solver > I remember projectile motion being pretty close to the beginning > of my physics journey; most of my classmates would not have known > what to make of negative values for time. Where was the projectile ten seconds ago? What happened in the year 400 B.C. ? :) === Subject: Re: Projectile Motion Problem and HP solver >> >>The quadratic has two solutions, and the equation library solver happens >>to give you the other one by default. ;-) >> >>You can get the other one by entering an initial guess for t that's >>closer to the value you want (say, 100 seconds). Enter 100 for t before >>solving for it. For more details, see pages 18-6 through 18-8 in the >>user guide (the section on SOLVR). >> >>When I do this, I get t=30.15 seconds. After doing this, you also get >>the corresponding positive solutions for x, vx, vy, etc when you solve >>for them. >> >> >>> Harold-Cimer@utc.edu >> >>Typo in your sig? > What you say is true. What I am trying to figure out is why in the > jet problem the SOLVER gives the negative root without a guess for the > time and in the problem from my projectile motion lab it gives the > correct positive root, with out having to make a guess for the time of > flight.. Just luck, I suspect. They may use different algorithms, which happen to select different roots. But I don't think either one of them \knows\ which root you want, and in a different problem I'd think either one of them could give the \right\ or the \wrong\ one. What would probably be ideal would be to solve the quadratic via some method that gives you both solutions, so you can decide for yourself which one is appropriate for the problem at hand. I forget the easiest way to do this on the HP48. === Subject: Re: Question About HP50g Keys? posting-account=tK2cUgkAAABPl7vxXuLS8-X63eEhN1C3 .NET CLR 1.1.4322; InfoPath.1; .NET CLR 2.0.50727; .NET CLR \ 3.0.04506.30; .NET CLR 3.0.04506.648),gzip(gfe),gzip(gfe) > After 15 months of hardcore use (hp49g+): > http://erwin.ried.cl/?modo=visor&elemento=200 Yes, you are right: the 49g+ and the 49G had lots of problems with the paint rubbing off and even falling off. However, this thread is about the HP 50g, which really seems to have solved all of those issues. -Joe- === Subject: Re: Question About HP50g Keys? \Joe Horn\ kirjoitti >> After 15 months of hardcore use (hp49g+): >> http://erwin.ried.cl/?modo=visor&elemento=200 > > Yes, you are right: the 49g+ and the 49G had lots of problems with the > paint rubbing off and even falling off. However, this thread is about > the HP 50g, which really seems to have solved all of those issues. > The paint on our loved brother Joe's keys peal off like sin from a newborn human being but somehow all the paint is still intact on my keys all my 49g+ broke before guarantee period and I never complained to Hell-Packed co. also the ON key on my 50g is already broken so much for the quality of those products I use my 49G when I need quality keyboard and symbolics VPN === Subject: Re: Question About HP50g Keys? posting-account=sOAX1QkAAAC-FcySTSbz29Uk8huUtFRz GTB5; .NET CLR 1.1.4322; .NET CLR 2.0.50727),gzip(gfe),gzip(gfe) On Feb 18, 3:42Êam, \Veli-Pekka Nousiainen\ > I use my 49G when I need quality keyboard and symbolics > > VPN The 49G with its rubber keys? S.C. === Subject: Re: Question About HP50g Keys? exactly - extremely durable and accurate it's all the old-school whiners who caused the 49g+ keyboard disaster... kirjoitti On Feb 18, 3:42 am, \Veli-Pekka Nousiainen\ > I use my 49G when I need quality keyboard and symbolics > > VPN The 49G with its rubber keys? S.C. === Subject: Re: Question About HP50g Keys? posting-account=v6m75AoAAAAgp3vyiLFAfyqmfMcXEPkm Gecko/2009011913 Firefox/3.0.6,gzip(gfe),gzip(gfe) Reading about dissimilar experiences like the ones of JKH and VPN, and other \intensive\ users with \not pristine\ keyboard on their 50g, it occurs to me that one of the following must be happening: 1)Quality of 50g keyboards is not uniform between production batches. 2)Some people press too hard on the keys and/or too many keystrokes on little time. Nonetheless, keyboard quality should withstand intensive use as long as people don«t pound on it with a hammer. I«d prefer a not-clicking but eternal keyboard like Casio's \ FX-4000P. That«s a great keyboard to me. One can achieve great typing \ speed on it, with a light touch. Anyway, my 50g keyboard is fine, hope it«ll never let me \ down. === Subject: Re: Question About HP50g Keys? posting-account=sOAX1QkAAAC-FcySTSbz29Uk8huUtFRz GTB5; .NET CLR 1.1.4322; .NET CLR 2.0.50727),gzip(gfe),gzip(gfe) > 2)Some people press too hard on the keys and/or too many keystrokes on > little time. Would pressing too hard on the keys permanently deform the metal domes underneath the plastic keys? I know that the \click\ feel is generated by the metal domes inverting. Would too hard a press permanently invert the domes so that future contact is more difficult? The 50g's keys are relatively heavy -- when I lend mine to someone else, they usually press the keys far harder than I do after feeling the initial resistance. Then they give it back to me 10 seconds later when they realize they can't figure out how to add two numbers in RPN mode. S.C. === Subject: Re: Question About HP50g Keys? I did that with my first 41CX using StopWatch an [R/S] key Me and friends tested reaction times with double keystrokes A guitar man won with 7 milliseconds (I was second with 10ms) With a lot of hammering the key felt soft later on kirjoitti > 2)Some people press too hard on the keys and/or too many keystrokes on > little time. Would pressing too hard on the keys permanently deform the metal domes underneath the plastic keys? I know that the \click\ feel is generated by the metal domes inverting. Would too hard a press permanently invert the domes so that future contact is more difficult? The 50g's keys are relatively heavy -- when I lend mine to someone else, they usually press the keys far harder than I do after feeling the initial resistance. Then they give it back to me 10 seconds later when they realize they can't figure out how to add two numbers in RPN mode. S.C. === Subject: Re: Question About HP50g Keys? posting-account=B0WVuwoAAAB0jipMiVc4s-L42AIMUuHa Gecko/2009020911 Ubuntu/8.04 (hardy) \ Firefox/3.0.6,gzip(gfe),gzip(gfe) On Feb 19, 12:37Êam, \Veli-Pekka Nousiainen\ > I did that with my first 41CX using StopWatch an [R/S] key > Me and friends tested reaction times with double keystrokes > A guitar man won with 7 milliseconds (I was second with 10ms) > With a lot of hammering the key felt soft later on > > kirjoitti > > > 2)Some people press too hard on the keys and/or too many keystrokes on > > little time. > > Would pressing too hard on the keys permanently deform the metal domes > underneath the plastic keys? I know that the \click\ feel is generated > by the metal domes inverting. Would too hard a press permanently > invert the domes so that future contact is more difficult? > > The 50g's keys are relatively heavy -- when I lend mine to someone > else, they usually press the keys far harder than I do after feeling > the initial resistance. Then they give it back to me 10 seconds later > when they realize they can't figure out how to add two numbers in RPN > mode. > > S.C. I gather the jury is still out on the 50g endurance. I think it's sad that the advancement in technology in the past 20 years has yet produced an affordable way to make equal-or-better quality replacement keyboard for calculators. Especially HP calculators for professionals. Both TI and CASIO calculators look more like toys than tools used by professionals. Just too much plastic look and feel. Oh, well! === Subject: Re: Question About HP50g Keys? posting-account=sOAX1QkAAAC-FcySTSbz29Uk8huUtFRz GTB5; .NET CLR 1.1.4322; .NET CLR 2.0.50727),gzip(gfe),gzip(gfe) > > After 15 months of hardcore use (hp49g+): > >http://erwin.ried.cl/?modo=visor&elemento=200 > > Yes, you are right: the 49g+ and the 49G had lots of problems with the > paint rubbing off and even falling off. ÊHowever, this thread \ is about > the HP 50g, which really seems to have solved all of those issues. > > -Joe- I have a 50g that I put through slightly more than 2 years of moderate use. None of the key labeling is rubbing off. I just have three keys that give a slightly \hollow\ clicking sound when pressed. In addition, two other keys have a slight \mushy\ feel as opposed to the satisfying click that the other keys give. The 50g and 48SX really can't be fairly compared in terms of build quality. The 48SX sold for $350 nineteen years ago! Nowadays, the 50g can be had online for about $110. According to http://inflationdata.com/Inflation/Inflation \ Calculators/Inflation Rate Calculator.asp , $350 in 1990 is worth about $580 in 2008 dollars, so as long as the 50g lasts for 20% of the lifetime of a 48SX, it's a deal. S.C. === Subject: Re: Question About HP50g Keys? > Yes, you are right: the 49g+ and the 49G had lots of problems with the > paint rubbing off and even falling off. However, this thread is about > the HP 50g, which really seems to have solved all of those issues. Yeah, although they added some new ones, like the considerably worse power efficiency. :-) Still, the 50g is of course a very nice machine. === Subject: Re: Question About HP50g Keys? posting-account=B0WVuwoAAAB0jipMiVc4s-L42AIMUuHa Gecko/2009020409 Iceweasel/3.0.6 \ (Debian-3.0.6-1),gzip(gfe),gzip(gfe) I don't speak the language but the pictures speak thousands of words. Wow! Less than 2 years old. HP quality really had gone downhill with that one. Give another 3 years or more before we know if the 50g was really an improvement. I couldn't help but wonder what HP high-end calculators will be 3 years from now?!? > > > > > Do the paints on the keys come off over time under normal to heavy > > useage? > > > I learned that my old 48SX (Singapore) and 32SII (USA) keys were > > molded, not painted like the new generation of HP calculators. It > > appears that starting or not long after production in Indonesia, the > > quality of HP calcs are not what they used to be. > > > When I bought my 32SII (still in excellent condition) years ago, I was > > afraid that the paints on the keys would rub off, not knowing they > > were molded, so I covered the key tops with a thin layer of clear nail > > polish, hoping to make it last as long as possible. I haven't used it > > much but the clear coat is still there! > > > I wonder if anyone who has problem with the paint on the 50g rubbing > > off? > > > Also, are the keys on the 50g the same for all production? > > > I saw comments saying they are a little hard to press and can be > > tiresome after a while. My own experience with less-than-a-week old > > used 50g (CNA733xxxx) is that they are OK, but some keys are smaller > > than the others. Not like the 48SX where only the ENTER key is twice > > as wide. I wish they had the alphabet letters printed to the side of > > the key like they did in the 48SX, instead of on top, making the key > > tops appear clustering. > > > I do think about putting a clear coat of nail polish on the key tops > > so they outlast the calculator useful life. > > > After 15 months of hardcore use \ (hp49g+):http://erwin.ried.cl/?modo=visor&elemento=200 === Subject: Re: Question About HP50g Keys? \The 10s is not an HP. It is a Casio clone that was rebranded.\ What a bizarre world we live in when company C and company H both make the same type of product, and company H figures they can make more money \ slapping their label on a competitor company C's product than just selling their own \ product... === Subject: Variable number solve problems posting-account=OrgFswoAAABXkfvazHaNgJt7ZDsw9AqI Gecko/2009011913 Firefox/3.0.6,gzip(gfe),gzip(gfe) Whenever i use the number solve it works the first time i use a variable and then it dosn't work with that variable again even after i purge it. any suggestions?? === Subject: Re: Variable number solve problems posting-account=itRlSAoAAADIJvOzSGM8mjsK7gvlk1wg Gecko/20071127 Firefox/2.0.0.11,gzip(gfe),gzip(gfe) Did you change any parameter in your equation? Could you describe your equation and ... more detailed? Peter === Subject: The HP Calculator Calendar for year 2009 Still Available posting-account=K31tcwgAAABVnT_oG3A7BQonvJCmOPn4 Just a note to say that we still have plenty copies available of the HP Calculator Calendar for the year 2009. This 8-1/2 by 11-inch glossy keepsake showcases every HP handheld calculator ever made in color photos and is useful throughout the year. It also includes images of the new low-cost machines (OfficeCalc 300, EasyCalc 100 and SmartCalc 300s) introduced just last month at the 2009 Consumer Electronics Show. Information for obtaining the calendar is available at http://www.pahhc.org/2009/Calendar.htm on the web. Also, if you are in Europe and an HPCC member, Wlodek Mier- Jedrzejowicz (HPCC chairman) has some copies of the calendar available for sale from London. For information, email Wlodek at chair@hpcc.org. Jake Schwartz === Subject: Re: The HP Calculator Calendar for year 2009 Still Available posting-account=HFaIbwkAAADIyWSU_QyRq04hgVf36Ebt rv:1.8.1.20; Google-TR-3) Gecko/20081217 \ Firefox/2.0.0.20,gzip(gfe),gzip(gfe) > > Just a note to say that we still have plenty copies available of the > HP Calculator Calendar for the year 2009. > This 8-1/2 by 11-inch glossy keepsake showcases every HP handheld > calculator ever made in color photos and is useful throughout the > year. It also includes images of the new low-cost machines (OfficeCalc > 300, EasyCalc 100 and SmartCalc 300s) introduced just last month at > the 2009 Consumer Electronics Show. Information for obtaining the > calendar is available athttp://www.pahhc.org/2009/Calendar.htmon the > web. Also, if you are in Europe and an HPCC member, Wlodek Mier- > Jedrzejowicz (HPCC chairman) has some copies of the calendar available > for sale from London. For information, email Wlodek at > ch...@hpcc.org. > > > Jake Schwartz i would have designed it differently; As this presentation seems to step on one of my pet-peeves, And that is: It Treats the HP Calculator line as Jewelry or Faberge Eggs...! i would have shown what you can do with them... But that's just me. Still... A Must Have for Everyone that Reads this Group...! === Subject: Re: The HP Calculator Calendar for year 2009 Still Available >> >> Just a note to say that we still have plenty copies available of the >> HP Calculator Calendar for the year 2009. >> This 8-1/2 by 11-inch glossy keepsake showcases every HP handheld >> calculator ever made in color photos and is useful throughout the >> year. It also includes images of the new low-cost machines (OfficeCalc >> 300, EasyCalc 100 and SmartCalc 300s) introduced just last month at >> the 2009 Consumer Electronics Show. Information for obtaining the >> calendar is available athttp://www.pahhc.org/2009/Calendar.htmon the >> web. Also, if you are in Europe and an HPCC member, Wlodek Mier- >> Jedrzejowicz (HPCC chairman) has some copies of the calendar available >> for sale from London. For information, email Wlodek at >> ch...@hpcc.org. >> >> >> Jake Schwartz > > i would have designed it differently; > As this presentation seems to step on one of my pet-peeves, > And that is: It Treats the HP Calculator line as Jewelry or Faberge > Eggs...! > i would have shown what you can do with them... > > But that's just me. > > Still... A Must Have for Everyone that Reads this Group...! It would have been nice to include some of the wild \HP Quality\ \ stories... \I'm a petroleum engineer in Alaska and one day while driving to work, I forgot my HP65 on the roof of my truck. It fell off and hit the road and the 18-wheeler behind me ran over it and threw it into the air. By sheer luck it made a hole-in-one and fell into a vertical mineshaft. It fell 3285 \ feet to the bottom. Before I could retrieve it, we had an earthquake which \ sealed the mineshaft. I thought my trusty 65 was gone forever. But as luck \ would have it, 3 years later and 38 miles away, the 65 was shot out of a new \ gusher we drilled. All covered in crude oil, it took nearly an hour to clean it. Then came the moment of truth. I switched it on, and up came the \ friendly red \0.00\. HP has done it again!\ But I think my all-time favorite is the one about the troop of wild monkeys \ that trashed a lab in India and threw all the equipment (including an HP) out the windows. Now try explaining that to your insurance agent. -J === Subject: Re: The HP Calculator Calendar for year 2009 Still Available posting-account=Q2CEjQoAAACue5ZDDhUeRzv1w0u8hxZE rv:1.9.1b2) Gecko/20081201 Firefox/3.1b2,gzip(gfe),gzip(gfe) > It would have been nice to include some of the wild \HP Quality\ \ stories... > > \I'm a petroleum engineer in Alaska and one day while driving to work, I > forgot my HP65 on the roof of my truck. Ê I am 99% sure that you just made that one up. . . the fact that there is a tiny bit of me thinking it could be possible says something - either about me or HP calcs! :-) > But I think my all-time favorite is the one about the troop of wild \ monkeys > that trashed a lab in India and threw all the equipment (including an HP) > out the windows. ÊNow try explaining that to your insurance \ agent. I think I remember reading that one. The hippo one was entertaining as well. TW === Subject: Re: CREDIT CARD SERVISES Mail-To-News-Contact: abuse@dizum.com > > CREDIT CARD SERVISES > ______________________________ > http://creditcardservises.blogspot.com I'll give you my Google password and and nick when you learn to correctly spell \servises.\ NOT! Il mittente di questo messaggio|The sender address of this non corrisponde ad un utente |message is not related to a real reale ma all'indirizzo fittizio|person but to a fake address of an di un sistema anonimizzatore |anonymous system Per maggiori informazioni |For more info https://www.mixmaster.it === Subject: customized menu posting-account=T6_JoAoAAAD5X1NpIb7ZcQrmFCd8Otqa Gecko/2009011913 Firefox/3.0.6,gzip(gfe),gzip(gfe) Hello! Can I use more than 3 options for a single label from a customized menu, in the hp 50G? Example: Ç { { \LABEL\ { Ç 1 È @ [LABEL] Ç 2 È @ [<-] [LABEL] Ç 3 È @ [->] [LABEL] Ç 4 È @ ??????? } } } TMENU È === Subject: Re: customized menu > Can I use more than 3 options for a single label from a customized > menu, in the hp 50G? > Example: > \\<< > { > { \LABEL\ > { > \\<< 1 \\>> @ [LABEL] > \\<< 2 \\>> @ [<-] [LABEL] > \\<< 3 \\>> @ [->] [LABEL] > \\<< 4 \\>> @ ??????? > } > } > } > TMENU > \\>> Menu key actions can be supplied for unshifted, left-shifted, and right-shifted menu keys, as you know. Other shift actions are supplied via key assignments (ASN, STOKEYS), not via the current menu, but you can of course make such assignments independently. An experiment shows well enough that only the first three actions have any effect, and that all additional \shift planes\ remain assigned as they already were (or that \shift and hold,\ when not otherwise defined, acts the same as \shift\): { { \Label\ { 1 2 3 4 5 6 7 8 9 } } } TMENU We can also see by experiment that ASN and STOKEYS, when applied to any menu (top row) key in the first three shift planes, override the menu definition. E.g. either precede or follow the above with 10 11.3 ASN, now the right-shifted menu key always generates \10\ In other words, the default key definitions for the menu (top row) keys, in the first three shift planes (no shift, left shift, right shift) are to interpret the current menu, while the defaults for other shift \ planes are not defined to make any use of the current menu. This is not to say that you can't assign new key definitions in other shift \ planes which would look for more objects in the current menu definition, creating your own extension to the meaning of menus, but then you might have some trouble composing text or using the graphing keys. [r->] [OFF] === Subject: Re: customized menu no ------------------------------------------------ \Valfisio\ kirjoitti Hello! Can I use more than 3 options for a single label from a customized menu, in the hp 50G? Example: Ç { { \LABEL\ { Ç 1 È @ [LABEL] Ç 2 È @ [<-] [LABEL] Ç 3 È @ [->] [LABEL] Ç 4 È @ ??????? } } } TMENU È === Subject: Re: customized menu <%ifol.5320$cu3.1978@uutiset.elisa.fi> posting-account=T6_JoAoAAAD5X1NpIb7ZcQrmFCd8Otqa Gecko/2009011913 Firefox/3.0.6,gzip(gfe),gzip(gfe) === Subject: Re: customized menu posting-account=57eBeAkAAABkNMhsZnDBzGQsstJRmvKD Gecko/2009011913 Firefox/3.0.6,gzip(gfe),gzip(gfe) Hello Of course you can. You can do whatever you want, as long as you deliver a valid menu. The menu system is extremly flexible ! You can define which label is shown under which circumstance and what will be delivered. Use IF THEN ELSE for example. HTH, Andreas http://www.software49g.gmxhome.de === Subject: Re: customized menu posting-account=T6_JoAoAAAD5X1NpIb7ZcQrmFCd8Otqa Gecko/2009011913 Firefox/3.0.6,gzip(gfe),gzip(gfe) I«m sorry, Andreas. I don«t understand. Can you show me? Using the previous example. PS: Sorry for my english! === Subject: Re: customized menu posting-account=Q2CEjQoAAACue5ZDDhUeRzv1w0u8hxZE rv:1.9.1b2) Gecko/20081201 Firefox/3.1b2,gzip(gfe),gzip(gfe) > I«m sorry, Andreas. > I don«t understand. > Can you show me? Using the previous example. > PS: Sorry for my english! Without getting into sysRPL, you can't have a menu key that has additional key press options as that is not supported by the standard menu tools. What he is saying is that you can have a menu key that is something else depending on what menu you are in, a varaible, or whatever by using an IF THEN ELSE construction. I see what he is saying, but I can't think of a good example showing why that would be useful. TW === Subject: Re: customized menu posting-account=57eBeAkAAABkNMhsZnDBzGQsstJRmvKD Gecko/2009011913 Firefox/3.0.6,gzip(gfe),gzip(gfe) > > > I«m sorry, Andreas. > > I don«t understand. > > Can you show me? Using the previous example. > > PS: Sorry for my english! > > Without getting into sysRPL, you can't have a menu key that has > additional key press options as that is not supported by the standard > menu tools. What he is saying is that you can have a menu key that is > something else depending on what menu you are in, a varaible, or > whatever by using an IF THEN ELSE construction. I see what he is > saying, but I can't think of a good example showing why that would be > useful. > > TW I believe it is possible if you create a structure of a menu that calls itself. It might be tricky, but I think it could be done in UserRPL. However, I do not have time for developing in UserRPL. So this is a great exercise for the novice ;-) Andreas http://www.software49g.gmxhome.de === Subject: Re: customized menu >> you can't have a menu key that has additional key press options >> as that is not supported by the standard menu tools. > I believe it is possible if you create a structure > of a menu that calls itself. This apparent disagreement may be just a matter of semantics. If \additional key press options\ is taken to mean the use of other shift key combinations with menu keys, which is what the original question seemed to mean, given the proposed menu it contained, then the first statement is correct, because the fundamental manner in which menus are implemented is that the internal library functions assigned to the top row keys, in the first three shift planes (no shift, left and right shift) are those which interpret the current menu, which thus affords no other \shift key\ options within menus. If you interpret the original question as whether any given menu key can then perform fabulous functions, such as creating \multi-level\ \ menus, changing menu labels, etc., then of course one can manage such feats, even in UserRPL -- I recall posting both a multi-level menu simulation and a function to cycle a menu key through various states and labels (re what fractions of an inch to resolve in an application), though I do not recall offhand the 16-hex-digit Google numbers of those \ postings :) -- === Subject: =?ISO-8859-1?Q?Nuevo_foro_de_calculadoras_HP_en_espa=F1ol?= posting-account=MBvYZgoAAAD-sb4p1dzBXY2WcI-axCzF Gecko/2009011913 Firefox/3.0.6,gzip(gfe),gzip(gfe) Les paso la voz. Hay un nuevo foro sobre calculadoras hp en espa\.96ol. La direcci\.97n es: http://hpcalc.foroactivo.com Yo ya me registr\.8e. === Subject: =?ISO-8859-1?Q?Nuevo_foro_de_calculadoras_HP_en_espa=F1ol?= posting-account=MBvYZgoAAAD-sb4p1dzBXY2WcI-axCzF Gecko/2009011913 Firefox/3.0.6,gzip(gfe),gzip(gfe) Les paso la voz. Hay un nuevo foro sobre calculadoras hp. La direcci\.97n es: http://hpcalc.foroactivo.com Yo ya me registr\.8e. === Subject: Re: HP48 ROM source code stfox a \.8ecrit > Hi ! > > I recently worked on \Stacker4x\ project with Yann, > what awaked my passion about HP48 :) > I therefore went through this newsgroup in which > I did not have access during my years secondary schools, > and of discovery in discovery, I came across this post : > > > Obviously ROM source are in circulation :) > > So my question is: Somebody would have the HP48 ROM source code (S and \ G), > and could provide them me please ? > > Graal quest would be over ? lol > I hope ... > > Excuse me for my poor English... :( > > Bruno You can use Paul's HP48 emulator that automatically decompile the code http://www.courbis.fr/Emulateur-decompilateur-Saturn.html === Subject: Re: InformBox Field Message Handler not triggering posting-account=r7Wz2woAAADbojNXOAG_GtmZnOckiljZ Gecko/2008052906 Firefox/3.0,gzip(gfe),gzip(gfe) However how come Debugx 136 doesn't stop at breakpoints in this InformBox Field Message handler, when running in debug mode? Although I've noticed other Message Handler will stop at breakpoints? rgds Steve Wainwright === Subject: Re: InformBox Field Message Handler not triggering posting-account=r7Wz2woAAADbojNXOAG_GtmZnOckiljZ Gecko/2008052906 Firefox/3.0,gzip(gfe),gzip(gfe) > > However how come Debugx 136 doesn't stop at breakpoints in this > InformBox Field Message handler, when running in debug mode? Although > I've noticed other Message Handler will stop at breakpoints? > > rgds > Steve Wainwright On optimising for repeated Field Message Handle code, found that if Inc MessageHandler for first line in field definitions. Breakpoint in the Inc MessageHandler routine will stop. === Subject: Re: InformBox Field Message Handler not triggering posting-account=MBvYZgoAAAD-sb4p1dzBXY2WcI-axCzF Gecko/2009011913 Firefox/3.0.6,gzip(gfe),gzip(gfe) >Can't seem to get the field message handler to trigger? >Trying to check that a field entry is less than 359.99 and gretaer >than 0.0, before that field looses focus to the next Aqui tienes un ejemplo con el comando IfMain, con dos campos de n\.9cmeros reales, haciendo validacion de datos solo al primer campo usando el message handler 22 ( IfMsgCommandLineValid ) en ese campo y el message handler n\.bc 16 ( IfMsgKeyOK ) sobre todo el formulario de entrada: :: \DATA1:\ BINT19 BINT18 \DATA2:\ BINT19 BINT29 ' MESSAGE REAL DATA1 BINT44 BINT18 BINT72 BINT8 BINT1 { BINT0 } BINT4 \Input data 1\ MINUSONE DUP MINUSONE DUP 'DROPFALSE BINT44 BINT28 BINT72 BINT8 BINT1 { BINT0 } BINT4 \Input data 2\ MINUSONE DUP MINUSONE DUP BINT2 BINT2 ' :: BINT16 #=casedrop ( -> flag TRUE ) :: FLASHPTR IfPutFieldsOnStack ( ob1 ob2 ... obn ) FLASHPTR IfGetNbFields ( ob1 ob2 ... obn #n ) {}N ( { ob1 ob2 ... obn } ) xNOVAL SWAP ( NOVAL { ob1 ob2 ... obn } ) FLASHPTR ListPos ( #i ) #0<> case :: \Escribe todos los datos\ FlashWarning FalseTrue ; BINT0 FLASHPTR IfGetFieldValue Test Real NOTcase :: \Data1 debe estar entre 0 y 359.99\ FlashWarning BINT0 \ FLASHPTR IfSetField FalseTrue ; TrueTrue ; DROPFALSE ; \TITLE\ FLASHPTR IfMain ; :: BINT22 #=casedrop :: RCL CMD palparse NOTcase2drop DROPFALSE EVAL DEPTH #1- NDROP ( un objeto o MINUSONE ) DUPTYPEZINT? IT FLASHPTR Z>R DUPTYPEREAL? case :: Test Real ITE FALSE :: \Data1 debe estar entre 0 y 359.99\ FlashWarning TRUE \ ; ; DROPFALSE ; DROPFALSE ; :: DUP %0> SWAP 359.99 %< AND ; \ > > However how come Debugx 136 doesn't stop at breakpoints in this > > InformBox Field Message handler, when running in debug mode? Although > > I've noticed other Message Handler will stop at breakpoints? Esccribiendo el codigo que escrib\.92 en el Debug4x ( con el message podras seguirlo paso a paso cada comando. \ Para esta y otras explicaciones entra al foro en espa\.96ol y registrate. La direcci\.97n es: http://hpcalc.foroactivo.com === Subject: Re: Statistic Pac for 48sx posting-account=itRlSAoAAADIJvOzSGM8mjsK7gvlk1wg Gecko/20080201 (CK-PC-WELT) Firefox/2.0.0.12,gzip(gfe),gzip(gfe) Perhaps you could search in http://www.hpmuseum.org/. Thea have lots of maunuals available Peter === Subject: Re: Manipulating list of functions Hi Syd, Your small program contains quite a number of errors and/or matters of programming style: 1. The line funcList := #[x] & /@ {nbrshares, initialinvestment, profit, totalofholding}; gives an argument to all symbols in the list even to ones you don't have defined as having one (initialinvestment, totalofholding) 2. The line totalofholding := profit + initialinvestment; uses profit without argument wheras you have defined it as a function with an argument. 3. The two functions that you do define use buyprice as the single argument. Especially in profit I'd put at least finalprice in the argument list. Function definitions containing variables and parameters that are not part of the argument list have a great potential for programming errors. As least the variables used should be present in the argument list. 4. It's not good programming style to redefine functions and constants (that have not changed) over and over again during the evaluation of the body of Manipulate 5. You are plotting different values with different dimensions and potentially considerable different value ranges in the same plot The following works: DynamicModule[{initialinvestment = 100000, nbrshares, profit, totalofholding}, nbrshares[buyprice_] := initialinvestment/buyprice; profit[buyprice_, finalprice_, nbrshares_] := (finalprice - buyprice)*nbrshares; totalofholding[buyprice_, finalprice_, nbrshares_] := profit[buyprice, finalprice, nbrshares] + initialinvestment; Manipulate[ Plot[ { nbrshares[buyprice], initialinvestment, profit[buyprice, finalprice, nbrshares[buyprice]], totalofholding[buyprice, finalprice, nbrshares[buyprice]] }, {buyprice, 4, 7}, Axes -> False, Frame -> True, PlotRange -> All ], {finalprice, 16, 24, 1} ] ] > Hi all, > > we recently had a thread regarding manipulating a list of functions > which worked fine:- > > Manipulate[Block[{funcA, funcB, funcC, funcList}, > funcA[z_] := Sin[z + a]; > funcB[z_] := Cos[z + b]; > funcC[z_] := funcA[z] + funcB[z]; > funcList = #[x] & /@ {funcA, funcB, funcC}; > Plot[Evaluate[funcList], {x, 1, 10}, Axes -> False, Frame -> > True]], {a, 0, > Pi}, {b, 0, Pi}] > > I have tried what I thought would be a trivial a variant of this for > very simple functions: > > Manipulate[ > Block[{initialinvestment, nbrshares, profit, totalofholding, > funcList}, > initialinvestment := 100000; > nbrshares[buyprice_] := initialinvestment/buyprice; > profit[buyprice_] := (finalprice - buyprice)*nbrshares; > totalofholding := profit + initialinvestment; > funcList := #[x] & /@ {nbrshares, initialinvestment, profit, > totalofholding}; > Plot[Evaluate[funcList], {x, 4, 7}, Axes -> False, Frame -> True, > PlotRange -> {0, 650000}]], {finalprice, 16, 24, 1}] > > However I only get the nbrshares plotted, after several attempts I > cannot get the desired output and would appreciate advice as to why > the simpler function specifications lead to failure. > > It appears that unless the functions all contain explicit references > such as to \z\ in the first working example then they are omitted. > > > Syd Geraghty B.Sc, M.Sc. > > sydgerag...@mac.com > > Mathematica 7.0.0 for Mac OS X x86 (64 - bit) (21st November, 2008) > MacOS X V 10.5.6 === Subject: Re: Manipulating list of functions Manipulate[ Block[{buyprice = 100, initialinvestment, nbrshares, profit, totalofholding, funcList}, initialinvestment[x_] := 100000; nbrshares[buyprice_] := initialinvestment[buyprice]/buyprice; profit[buyprice_] := (finalprice - buyprice)*nbrshares[buyprice]; totalofholding[_] := profit + initialinvestment; funcList = #[x] & /@ {nbrshares, initialinvestment, profit, totalofholding}; Plot[Evaluate[funcList], {x, 4, 7}, Axes -> False, Frame -> True, PlotRange -> {0, 650000}]], {finalprice, 16, 24, 1}] ?? or what ever the dependences initialinvestment[] are and why you call profit[] as a function, and profit as a symbol is still strange. Jens > Hi all, > > we recently had a thread regarding manipulating a list of functions > which worked fine:- > > Manipulate[Block[{funcA, funcB, funcC, funcList}, > funcA[z_] := Sin[z + a]; > funcB[z_] := Cos[z + b]; > funcC[z_] := funcA[z] + funcB[z]; > funcList = #[x] & /@ {funcA, funcB, funcC}; > Plot[Evaluate[funcList], {x, 1, 10}, Axes -> False, Frame -> > True]], {a, 0, > Pi}, {b, 0, Pi}] > > I have tried what I thought would be a trivial a variant of this for > very simple functions: > > Manipulate[ > Block[{initialinvestment, nbrshares, profit, totalofholding, > funcList}, > initialinvestment := 100000; > nbrshares[buyprice_] := initialinvestment/buyprice; > profit[buyprice_] := (finalprice - buyprice)*nbrshares; > totalofholding := profit + initialinvestment; > funcList := #[x] & /@ {nbrshares, initialinvestment, profit, > totalofholding}; > Plot[Evaluate[funcList], {x, 4, 7}, Axes -> False, Frame -> True, > PlotRange -> {0, 650000}]], {finalprice, 16, 24, 1}] > > However I only get the nbrshares plotted, after several attempts I > cannot get the desired output and would appreciate advice as to why > the simpler function specifications lead to failure. > > It appears that unless the functions all contain explicit references > such as to \z\ in the first working example then they are omitted. > > > > Syd Geraghty B.Sc, M.Sc. > > sydgeraghty@mac.com > > Mathematica 7.0.0 for Mac OS X x86 (64 - bit) (21st November, 2008) > MacOS X V 10.5.6 > > > > === Subject: Bug in Export to HTML in v7? The following very handy code to save a notebook as HTML and to follow closed links used to work in v6 no longer works in v7. Was wondering if there is a workaround: Export[\~/tmp/\, EvaluationNotebook[], \HTML\, \ConvertClosed\ -> \LinkedPage\]; (I put this code is in the notebook I am saving itself so it appears in the HTML output, which is OK). === Subject: Re: Manipulating list of functions Functions must have arguments to be evaluated. Corrections plus some bells \ and whistles: Manipulate[Block[ {initialinvestment, nbrshares, profit, totalofholding, funcList}, initialinvestment := 100000; nbrshares[buyprice_] := initialinvestment/buyprice; profit[buyprice_] := (finalprice - buyprice)*nbrshares[buyprice]; totalofholding[buyprice_] := profit[buyprice] + initialinvestment; funcList := Tooltip[#[x], #] & /@ {nbrshares, profit, totalofholding}; Plot[Evaluate[funcList], {x, 4, 7}, Epilog -> {Text[#[initialprice], {initialprice, #[initialprice]}, {Sign[initialprice - 5.5], -2}] & /@ {nbrshares, profit, totalofholding}, Red, AbsolutePointSize[3], Point[{initialprice, #[initialprice]} & /@ {nbrshares, profit, totalofholding}]}, Axes -> False, Frame -> True, FrameLabel -> {Style[\Buy Price\, 12]}, PlotRange -> {0, 650000}, ImageSize -> 500]], {{initialprice, 5.5, \Buy Price\}, 4, 7, 0.01}, {{finalprice, 20}, 16, 24, 1}] Bob Hanlon Hi all, we recently had a thread regarding manipulating a list of functions which worked fine:- Manipulate[Block[{funcA, funcB, funcC, funcList}, funcA[z_] := Sin[z + a]; funcB[z_] := Cos[z + b]; funcC[z_] := funcA[z] + funcB[z]; funcList = #[x] & /@ {funcA, funcB, funcC}; Plot[Evaluate[funcList], {x, 1, 10}, Axes -> False, Frame -> True]], {a, 0, Pi}, {b, 0, Pi}] I have tried what I thought would be a trivial a variant of this for very simple functions: Manipulate[ Block[{initialinvestment, nbrshares, profit, totalofholding, funcList}, initialinvestment := 100000; nbrshares[buyprice_] := initialinvestment/buyprice; profit[buyprice_] := (finalprice - buyprice)*nbrshares; totalofholding := profit + initialinvestment; funcList := #[x] & /@ {nbrshares, initialinvestment, profit, totalofholding}; Plot[Evaluate[funcList], {x, 4, 7}, Axes -> False, Frame -> True, PlotRange -> {0, 650000}]], {finalprice, 16, 24, 1}] However I only get the nbrshares plotted, after several attempts I cannot get the desired output and would appreciate advice as to why the simpler function specifications lead to failure. It appears that unless the functions all contain explicit references such as to \z\ in the first working example then they are omitted. Syd Geraghty B.Sc, M.Sc. sydgeraghty@mac.com Mathematica 7.0.0 for Mac OS X x86 (64 - bit) (21st November, 2008) MacOS X V 10.5.6 === Subject: Experimental Mathematica debugger I have been fairly dissatisfied with the built-in debugger available in versions 6 and 7, and I would like people to try an experimental new debugger for an earlier version of Mathematica - called M-Debug. That debugger was based on TraceScan, and was unable to locate Mathematica expressions within the original source code. It was also very slow when code was executing to a breakpoint. DebugTrace works in a new way, identifying program locations using line numbers which double as breakpoint toggle buttons! I work as a consultant, and in my experience, projects often start with a very large notebook, full of unstructured code, which it is necessary to understand. Beginners typically write programs in this style - often without a single user-defined function - and DebugTrace can operate well on this kind of code, as well as more elegant code and also packages. DebugTrace is a Mathematica program like any other - i.e. it operates without any kernel hacks, but this means that it is fairly easy to add support for particular pieces of software. For example the debugger knows about my Super Widget Package, and when appropriate, it displays an extra button that enables the debugger to gain control while a modal Java window is being displayed (without closing the window). I imagine that this flexibility may be useful in other contexts. Another revolutionary feature of DebugTrace, is that it comes with actual documentation, illustrated with a small example program! DebugTrace version 0.95 is available free from my website. It will remain free even after it is polished. If you find specific problems, it might be best to e-mail me directly with a simple example. As I say, this project is experimental, and its future development - if any - depends on the feedback I receive. David Bailey http://www.dbaileyconsultancy.co.uk === Subject: Re: question related to (-1)^(1/3) > I have tried expression: > RecurrenceTable[{x[n + 1] == -x[n]^(1/3), x[0] == 1}, > x, {n, 1, 200}] // N > > Mathematica produce > {-1., -0.5 - 0.866025 I, -0.766044 + 0.642788 I, -0.686242 - > 0.727374 I, -0.71393 + 0.700217 I, -0.704818 - 0.709389 I, > ... > > But it should be {1, -1, 1, -1, ... } > > If you try (-1)^(1/3) > > In[10]:= (-1)^(1/3) > > Out[10]= (-1)^(1/3) > > In[11]:= % // N > > Out[11]= 0.5 + 0.866025 I > As stated by others Mathematica always uses the principal branch for roots. To give me the real branch I use the following function: rprule=(b_?Negative)^Rational[m_,n_?OddQ]:>(-(-b)^(1/n))^m; Attributes[ReellePotenz]={Listable,NumericFunction,OneIdentity}; ReellePotenz[b_?Negative, Rational[m_, n_?OddQ]] := (-(-b)^(1/n))^m; ReellePotenz[x_,y_]:=Power[x,y]; ReellePotenz[x_]:=x//.rprule; Then you get: RecurrenceTable[{x[n + 1] == -x[n]^(1/3), x[0] == 1}, x, {n, 1, 10}] // ReellePotenz Out={-1, 1, -1, 1, -1, 1, -1, 1, -1, 1} Beware, that you can't apply this function to Reals, because they are evaluated immediately by Mathematica: In= (-1.)^(1/3) Out=0.5+0.866025I -- _________________________________________________________________ Peter Breitfeld, Bad Saulgau, Germany -- http://www.pBreitfeld.de === Subject: Re: Coolest Mathematica trick you'll see this month > >> I use Linux on my machines and enjoy helping other Archlinux users in >> the online forums. A fellow Arch user was having issues with >> Mathematica 7. He was plotting a 3D parametric equation and >> experiencing a sustained high processor load on this laptop; only >> killing the kernel would allow the CPU to idle down. He found that the >> laptop's accelerometer kernel driver was eating nearly 30% of the CPU >> time.... You'll just have to read the forum to see the rest! >> >> http://bbs.archlinux.org/viewtopic.php?id=65916 >> >> Can any Windows or Mac users duplicate this? Or is this a Linux-only >> \feature\? Or maybe this is well-known and I'm just late in finding \ ou= >> > t? > > On Linux, Mathematica will treat devices at /dev/input/js0 through jsN > as controllers. As you discovered, apparently this laptop's > accelerometer masquerades as a joystick. The high CPU usage is caused > by the driver sending many updates to the device file descriptor, > which Mathematica watches and does work whenever the values change. > > This can be disabled by adding the name of the controller (as returned > by ControllerInformation[]) to the value list for the undocumented > option \DisableControllers\: > > SetOptions[$FrontEnd, DisableControllers -> Prepend > [DisableControllers /. Options[$FrontEnd, DisableControllers], \DEVICE > > -Rob > > > unloading the accelerometer module. === Subject: AbsoluteOptions and ViewMatrix When viewing any graphics such as: s=PolyhedronData[\Dodecahedron\]; AbsoluteOption works as advertised with PlotRange, but not ViewMatrix: AbsoluteOptions[s,PlotRange] (* give you the actual plot range, not \All\ *) AbsoluteOptions[s,ViewMatrix] (* give you \Automatic\, not the actual value *) I understand that the actual PlotRange value is known to the kernel, but not the ViewMatrix, which is handled in the notebook. Does anybody know how to get the ViewMatrix value out of the Notebook? Sebastien === Subject: Nested list transformations Hello everybody. I was wondering if Mathematica can be helpful in the following problem. Suppose we have a nested list: {{1}, {2, 3}} And we are trying to do different kinds of transformations to this list. \ Like this: {{3, 1}, {2}}, {{3}, {1, 2}} This was a one element movement from one inner list to another. Also there \ can be element exchanges and two several sequential element movements etc. What I want to do is to keep track of these changes and see if some set of \ the transformations can lead to the list that is equal to the initial list. I showed this simplest possible example, but actually the Depth[] of the \ outer list should be 4: { { {1, 2, 3}, {2, 3, 4}, ... }, { {5, 6, 7}, {8, 5, 1}, {8, 1, 6}, }, .... } I guess that I should use Combinatorica package for this, but I'm not sure. \ And I'm not sure about the mathematical theory behidn this. === Subject: About Reduce and Mod Hi Mathematica community, I have this input: Reduce[{Mod[x, 5] == Mod[xP, 5], 0 <= xP < 5}, {xP}, Backsubstitution -> True] Mathematicas gives me this output:0 <= Re[Mod[x, 5]] < 5 && Im[Mod[x, 5]] == 0 && xP == Mod[x, 5] 1)but why there is 0 <= Re[Mod[x, 5]] < 5 && Im[Mod[x, 5]] == 0 as part of the output ? 2) and how could I eliminate it (by adding something in reduce for example) because all that I want is only this output xP == Mod[x, 5]? thank you very much. === Subject: Example for NetworkFlow function can you point me to a minimal commented example of the NetworkFlow function? I have a graph with sources, sinks and transshipment nodes and I do not know how to specify these nodes as function parameters. Any hint appreciated, Karsten. === Subject: Re: Eigensystem[hermitianMatrix] sometimes returns non-orthonormal > > In Mathematica 7.0.0 (for Linux), calling Eigenvectors[H] or \ Eigensystem[H] > for a numerical Hermitian matrix H sometimes returns eigenvectors that \ are > not orthonormal. > This happens when some eigenvalues are degenerate. (I can supply example > code that illustrates the problem, if necessary.) > > This is not really a bug -- the documentation for Eigensystem[] doesn't \ make > any guarantees of orthonormality -- but nevertheless it is an annoying \ part > of Mathematica's design. > This issue has been raised 11 years ago \ (http://forums.wolfram.com/mathgroup/archive/1998/Mar/msg00418.html), but > that post is corrupted! An uncorrupted version is at > (Surely Wolfram isn't resorting to censorship?) I > was hoping that in Mathematica 7 I would be able to write something like > > Eigensystem[H, Method->\LAPACK-ZHEEVR\] > > or > > Eigensystem[H, OrthonormalizeEigenvectors->True] > > but no such options seem to exist. One workaround is to apply > Orthogonalize[] to the matrix of eigenvectors, but the documentation for > Orthogonalize[] doesn't guarantee that the orthonormalization will only > occur within the \degenerate subspace\. So one has to resort to \ complicated > fixes (e.g.,http://arxiv.org/pdf/hep-ph/9607313). > Does anyone have a simpler solution? (For example, is there an easy wa y \ to > call LAPACK'S ZHEEVR routine, which guarantees orthornormal eigenvectors, > from Mathematica?) > > Yen Lee Loh === Subject: Re: Eigensystem[hermitianMatrix] sometimes returns non-orthonormal the online help say \Eigenvectors corresponding to degenerate eigenvalues are chosen to be linearly independent.\ So we need a example that show you are right. Jens > > In Mathematica 7.0.0 (for Linux), calling Eigenvectors[H] or \ Eigensystem[H] > for a numerical Hermitian matrix H sometimes returns eigenvectors that \ are > not orthonormal. > This happens when some eigenvalues are degenerate. (I can supply example > code that illustrates the problem, if necessary.) > > This is not really a bug -- the documentation for Eigensystem[] doesn't \ make > any guarantees of orthonormality -- but nevertheless it is an annoying \ part > of Mathematica's design. > This issue has been raised 11 years ago ( > http://forums.wolfram.com/mathgroup/archive/1998/Mar/msg00418.html ), but > that post is corrupted! (Surely Wolfram isn't resorting to censorship?) \ I > was hoping that in Mathematica 7 I would be able to write something like > > Eigensystem[H, Method->\LAPACK-ZHEEVR\] > > or > > Eigensystem[H, OrthonormalizeEigenvectors->True] > > but no such options seem to exist. One workaround is to apply > Orthogonalize[] to the matrix of eigenvectors, but the documentation for > Orthogonalize[] doesn't guarantee that the orthonormalization will only > occur within the \degenerate subspace\. So one has to resort to \ complicated > fixes (e.g., http://arxiv.org/pdf/hep-ph/9607313 ). > Does anyone have a simpler solution? (For example, is there an easy way \ to > call LAPACK'S ZHEEVR routine, which guarantees orthornormal eigenvectors, > from Mathematica?) > > Yen Lee Loh > > === Subject: Re: Exporting data into a file, OpenWrite > no double-slashes for me thank you very much - I've got a Mac. > > 2009/2/24 Sjoerd C. de Vries : >> >>> When you use Export, the file will be created in the current >>> working directory. >> I might add \...unless you include the full path to the file in the >> filename (using double slashes to separate directories and files, as a >> slash is used as an escape character in strings)\ >> I think correctly you would call the character that you need to use on Windows a backslash (\\) and that's the one you need to escape, because it is the escape character in Mathematica. On other systems you will need other characters for separating directories in pathes, which one is held in the variable $PathnameSeparator. AFAIK on Windows in many places within Mathematica a single slash (/) will also work as a pathname separator in filenames. Probably you shouldn't rely on that but it's more convenient than the double backslash sometimes. An even better approach is to construct the filename with the function ToFileName, starting with one of the predefined directory variables you can find with Information[\$*Directory*\] hth, albert === Subject: Re: Exporting data into a file, OpenWrite I know, but the guy mentioned Notepad which is a PC program. > no double-slashes for me thank you very much - I've got a Mac. > > 2009/2/24 Sjoerd C. de Vries : > > > >> When you use Export, the file will be created in the current > >> working directory. > > > I might add \...unless you include the full path to the file in the > > filename (using double slashes to separate directories and files, as a > > slash is used as an escape character in strings)\ > === Subject: Re: N00b help needed: Graphics > > I have a very simple problem: Visualization of > two data sets f={{x1,y1},{x2,y2},...} and > g={{X1,Y1},{X2,Y2},...}. > The first set shall be replaced by an interpolated curve: > F=Interpolation[f]. OK, that was trivial :-) > The second shall be shown as small dots overlayed on the graph > of f. Where is the problem, you ask? The problem is > my uni has version 5 and all the Graphics primitives > as shown on the Wolfram Internet site give no visible > output or even error messages! > Surely you have a command Plot[something_with_f_and_g] > for me working for any data lists? (Spline madness is > no issue, F is very smooth with my actual test data set f.) this works in 5.1: f=Table[{x,Sin[x]},{x,0,Pi,0.1}] g=Table[{x,Sin[x]+Random[Real,{-0.1,0.1}]},{x,0,Pi,0.1}] Show[Block[{$DisplayFunction=Identity},{ ListPlot[f,PlotJoined\\[Rule]True], ListPlot[g,PlotStyle\\[Rule]{Red,PointSize[0.02]}] }]] hth, albert === Subject: Re: N00b help needed: Graphics > > I have a very simple problem: Visualization of > two data sets f={{x1,y1},{x2,y2},...} and > g={{X1,Y1},{X2,Y2},...}. > The first set shall be replaced by an interpolated curve: > F=Interpolation[f]. OK, that was trivial :-) > The second shall be shown as small dots overlayed on the graph > of f. Where is the problem, you ask? The problem is > my uni has version 5 and all the Graphics primitives > as shown on the Wolfram Internet site give no visible > output or even error messages! > Surely you have a command Plot[something_with_f_and_g] > for me working for any data lists? (Spline madness is > no issue, F is very smooth with my actual test data set f.) > > THX, Before version 6 graphics expressions did not get rendered when they reached the front end - they just produced a thing that looked like -Graphics- Functions like Plot did the necessary rendering, but if you built the graphics up yourself - Graphics[{......... then you needed to wrap the whole thing in Show: Show@Graphics[{...... Needless to say this caused a lot of confusion at the time of the change! A few extra Graphics primitives have been added later, but whatever you use, you can check by looking for help, but you should find your program will burst into life once you make this change. Version 6/7 graphics is MUCH nicer, so you should try to pester your university to upgrade. Sometimes universities get software upgrades and don't get round to installing them! David Bailey http://www.dbaileyconsultancy.co.uk === Subject: Re: N00b help needed: Graphics data1 = Table[{x, Sin[x]}, {x, 0, 2 Pi, 2 Pi/64}] // N; f = Interpolation[data1]; data2 = Table[{x, Sin[x] + RandomReal[{-0.1, 0.1}]}, {x, 0, 2 Pi, 2 Pi/64}] // N; Plot[f[t], {t, 0, 2 Pi}, Epilog -> Point /@ data2] ?? Jens > > I have a very simple problem: Visualization of > two data sets f={{x1,y1},{x2,y2},...} and > g={{X1,Y1},{X2,Y2},...}. > The first set shall be replaced by an interpolated curve: > F=Interpolation[f]. OK, that was trivial :-) > The second shall be shown as small dots overlayed on the graph > of f. Where is the problem, you ask? The problem is > my uni has version 5 and all the Graphics primitives > as shown on the Wolfram Internet site give no visible > output or even error messages! > Surely you have a command Plot[something_with_f_and_g] > for me working for any data lists? (Spline madness is > no issue, F is very smooth with my actual test data set f.) > > THX, === Subject: Re: N00b help needed: Graphics Hi Hauke, Last time I checked, the version 5 Plot and ListPlot were working just fine. (BTW unbelievable Hamburg University doesn't have 6 or 7, that can't really be true). The following works on my version 5.2: f = Table[{x, Random[Real, {0.98, 1.02}] Sin[x]}, {x, 0, 2 =CF=80, =CF=80= /20.}] g = Table[{x, Random[Real, {0.9, 1.1}] Sin[x]}, {x, 0, 2 =CF=80, =CF=80/2= 0.}]; p1 = Plot[Interpolation[f][ x], {x, Min[f\\[Transpose][[1]]], Max[f\\[Transpose][[1]]]}] p2 = ListPlot[g] Show[p1, p2] If f is so smooth as you claim, you might consider dropping Interpolation: p1 = ListPlot[f, PlotJoined -> True] > > I have a very simple problem: Visualization of > two data sets f={{x1,y1},{x2,y2},...} and > g={{X1,Y1},{X2,Y2},...}. > The first set shall be replaced by an interpolated curve: > F=Interpolation[f]. OK, that was trivial :-) > The second shall be shown as small dots overlayed on the graph > of f. Where is the problem, you ask? The problem is > my uni has version 5 and all the Graphics primitives > as shown on the Wolfram Internet site give no visible > output or even error messages! > Surely you have a command Plot[something_with_f_and_g] > for me working for any data lists? (Spline madness is > no issue, F is very smooth with my actual test data set f.) > > THX, > -- > Hauke Reddmann <:-EX8 =C2 =C2 fc3a...@uni-hamburg.de > Nur Schufte schuften - Genie genie=C3=9Ft. === Subject: Re: N00b help needed: Graphics Hi Hauke, I do not have V5 around, but plotting the data points using Epilog (an option of Plot) should work, Daniel > > I have a very simple problem: Visualization of > two data sets f={{x1,y1},{x2,y2},...} and > g={{X1,Y1},{X2,Y2},...}. > The first set shall be replaced by an interpolated curve: > F=Interpolation[f]. OK, that was trivial :-) > The second shall be shown as small dots overlayed on the graph > of f. Where is the problem, you ask? The problem is > my uni has version 5 and all the Graphics primitives > as shown on the Wolfram Internet site give no visible > output or even error messages! > Surely you have a command Plot[something_with_f_and_g] > for me working for any data lists? (Spline madness is > no issue, F is very smooth with my actual test data set f.) > > THX, === Subject: Setting global Plot font options Hi - Where can I set the global default font for plot objects? I'd like AxesLabel, FrameLabel, PlotLegend, and the Ticks to all be the same font without having to specify it in the Plot call every time. TIA, Matt === Subject: Licenses for Sharing Notebooks I was wondering what kind of licenses are commonly used to distribute and share Mathematica notebooks, such as tutorials and interactive lecture notes, without completely setting them into public domain. focus on compiled binaries do not really seem to be appropriate. Maybe the different variations of Creative Commons Licenses [http:// creativecommons.org/license/] are a better fit? Could people in this group share if and why they selected a specific license in a similar siutation? Hans-Martin === Subject: Re: Map and functional constructs to replace iterative Some solutions In[3]:= vals = {3, 2.5, 7, 4.2, 8, 5.1, 2., 3}; using the built-in Differences: In[4]:= Differences[vals]/100 Out[4]= {-0.005, 0.045, -0.027999999999999997, 0.038, \ -0.029000000000000005, -0.030999999999999996, 0.01} with list operations In[5]:= ((1./100)*(Rest[#1] - Most[#1]) & )[vals] Out[5]= {-0.005, 0.045, -0.027999999999999997, 0.038, \ -0.029000000000000005, -0.030999999999999996, 0.01} MapThread In[6]:= (MapThread[(1./100)*(#1 - #2) & , {Rest[#1], Most[#1]}] & )[vals] Out[6]= {-0.005, 0.045, -0.027999999999999997, 0.038, \ -0.029000000000000005, -0.030999999999999996, 0.01} Transpose and Map In[7]:= (({1, -1} . #1/100. & ) /@ Transpose[{Rest[#1], Most[#1]}] & \ )[vals] Out[7]= {-0.005, 0.045, -0.027999999999999997, 0.038, \ -0.029000000000000005, -0.030999999999999996, 0.01} Adriano Pascoletti 2009/2/25 Andreas > I have begun to replace Table, Do, While, or For, but in my thinking with > Map, Inner, Outer and other functional programming constructs as I learn > more about Mathematica. > > But, I'm stuck. I need to figure out how to use Map (or some related > approach) when a function needs both a current value and a previous value \ in > a time series, such as a percentage change function (or perhaps more > generally stated, when I need to refer to previous values in a series or > even previous calculations). But first a simple case: > > percentChange[currentValue_, previousValue_] := 100 * ( currentValue - > previousValue) / previousValue > > I know how to apply this iteratively, but how can I do it with Map or \ some > other functional construct? > > Say I have a list: timeSeries > > I thought to try something like this: > > Map[percentChange[?,?], timeSeries] > > but I don't know how what to put in for \?\. > > Any help much appreciated. > > Thx. > > === Subject: Re: Map and functional constructs to replace iterative timeSeries = Table[k + RandomReal[{0, 1}], {k, 0, 20}] {0.120891, 1.16064, 2.50042, 3.18862, 4.02033, 5.13744, 6.37348, \\ 7.86513, 8.88356, 9.46121, 10.8472, 11.8567, 12.9746, 13.3022, \\ 14.606, 15.8236, 16.8817, 17.2755, 18.8514, 19.2049, 20.4023} percentChange[previous_, current_] := 100*(current - previous)/previous percentChange @@@ Partition[timeSeries, 2, 1] {860.067, 115.435, 27.5234, 26.0837, 27.7867, 24.0594, 23.404, \\ 12.9487, 6.5024, 14.6494, 9.30684, 9.42813, 2.52475, 9.80145, \\ 8.33611, 6.68689, 2.33276, 9.12233, 1.87529, 6.23463} or Clear[percentChange] percentChange[current_, previous_] := 100*(current - previous)/previous percentChange @@@ Partition[Reverse@timeSeries, 2, 1] {6.23463, 1.87529, 9.12233, 2.33276, 6.68689, 8.33611, 9.80145, \\ 2.52475, 9.42813, 9.30684, 14.6494, 6.5024, 12.9487, 23.404, 24.0594, \\ 27.7867, 26.0837, 27.5234, 115.435, 860.067} Under Help for Apply, you'll find: \f@@@expr is equivalent to Apply[f,expr,{1}].\ or, if you prefer Map: Clear[percentChange] percentChange[{current_, previous_}] := 100*(current - previous)/previous percentChange /@ Partition[Reverse@timeSeries, 2, 1] {6.23463, 1.87529, 9.12233, 2.33276, 6.68689, 8.33611, 9.80145, \\ 2.52475, 9.42813, 9.30684, 14.6494, 6.5024, 12.9487, 23.404, 24.0594, \\ 27.7867, 26.0837, 27.5234, 115.435, 860.067} You can even use both approaches with the same function: Clear[percentChange] percentChange[current_, previous_] := percentChange@{current, previous} percentChange[{current_, previous_}] := 100*(current - previous)/previous percentChange /@ Partition[Reverse@timeSeries, 2, 1] {6.23463, 1.87529, 9.12233, 2.33276, 6.68689, 8.33611, 9.80145, \\ 2.52475, 9.42813, 9.30684, 14.6494, 6.5024, 12.9487, 23.404, 24.0594, \\ 27.7867, 26.0837, 27.5234, 115.435, 860.067} percentChange @@@ Partition[Reverse@timeSeries, 2, 1] {6.23463, 1.87529, 9.12233, 2.33276, 6.68689, 8.33611, 9.80145, \\ 2.52475, 9.42813, 9.30684, 14.6494, 6.5024, 12.9487, 23.404, 24.0594, \\ 27.7867, 26.0837, 27.5234, 115.435, 860.067} Or (faster than the others, and no need for a function): 100 (Rest@timeSeries - Most@timeSeries)/Most@timeSeries // Reverse {6.23463, 1.87529, 9.12233, 2.33276, 6.68689, 8.33611, 9.80145, \\ 2.52475, 9.42813, 9.30684, 14.6494, 6.5024, 12.9487, 23.404, 24.0594, \\ 27.7867, 26.0837, 27.5234, 115.435, 860.067} Bobby > I have begun to replace Table, Do, While, or For, but in my thinking > with Map, Inner, Outer and other functional programming constructs as I > learn more about Mathematica. > > But, I'm stuck. I need to figure out how to use Map (or some related > approach) when a function needs both a current value and a previous > value in a time series, such as a percentage change function (or perhaps \ > more generally stated, when I need to refer to previous values in a > series or even previous calculations). But first a simple case: > > percentChange[currentValue_, previousValue_] := 100 * ( currentValue - > previousValue) / previousValue > > I know how to apply this iteratively, but how can I do it with Map or > some other functional construct? > > Say I have a list: timeSeries > > I thought to try something like this: > > Map[percentChange[?,?], timeSeries] > > but I don't know how what to put in for \?\. > > Any help much appreciated. > > Thx. > -- DrMajorBob@longhorns.com === Subject: Re: Map and functional constructs to replace iterative statements > I have begun to replace Table, Do, While, or For, but in my > thinking with Map, Inner, Outer and other functional programming > constructs as I learn more about Mathematica. > > But, I'm stuck. I need to figure out how to use Map (or some > related approach) when a function needs both a current value and a > previous value in a time series, such as a percentage change > function (or perhaps more generally stated, when I need to refer to > previous values in a series or even previous calculations). But > first a simple case: > > percentChange[currentValue_, previousValue_] := 100 * > ( currentValue - previousValue) / previousValue > > I know how to apply this iteratively, but how can I do it with Map > or some other functional construct? One option is to use create the pairs of arguments, then apply the function percentChange[#,#2]&@@@Transpose[{Rest[timeSeries],Most[timeSeries]}] Another option is to do it recursively: computeChanges[{results_,{previous_,current_}}]:=Append [results,percentChange[previous,current]] computeChanges[{results_,{args__}}]:=computeChanges[{Append [results,percentChange[{args}[[2]],{args}[[1]]]],Rest[{args}]}] computeChanges[timeSeries_]:=computeChanges[{{},timeSeries}]/;VectorQ [timeSeries]&&Length[timeSeries]>=2 I realize the recursive solution does not use functional programming constructs but I've found that not having to worry about explicit indices can result in less bugs. Sseziwa Mukasa === Subject: Re: Map and functional constructs to replace iterative percentChange[currentValue_, previousValue_] := 100*(currentValue - previousValue)/previousValue data = {v1, v2, v3, v4}; percentChange @@@ Reverse /@ Partition[data, 2, 1] {(100*(v2 - v1))/v1, (100*(v3 - v2))/v2, (100*(v4 - v3))/v3} 100*ListCorrelate[{-1, 1}, data]/Most[data] {(100*(v2 - v1))/v1, (100*(v3 - v2))/v2, (100*(v4 - v3))/v3} % == %% True Bob Hanlon I have begun to replace Table, Do, While, or For, but in my thinking with \ Map, Inner, Outer and other functional programming constructs as I learn more \ about Mathematica. But, I'm stuck. I need to figure out how to use Map (or some related \ approach) when a function needs both a current value and a previous value in \ a time series, such as a percentage change function (or perhaps more \ generally stated, when I need to refer to previous values in a series or even \ previous calculations). But first a simple case: percentChange[currentValue_, previousValue_] := 100 * ( currentValue - \ previousValue) / previousValue I know how to apply this iteratively, but how can I do it with Map or some \ other functional construct? Say I have a list: timeSeries I thought to try something like this: Map[percentChange[?,?], timeSeries] but I don't know how what to put in for \?\. Any help much appreciated. Thx. === Subject: Re: listing user defined, independent variables Hi Jens, To your point a), what I mean is that, in the calculations that my notebook carries out, some variables get defined by the user assigning a value (a constant) directly to them. Others get defined in the code by assigning a value to them that depends on a calculation involving other variables. As I understand it, mathematica creates a store of all user defined symbols as a list of replacement rules - so it \knows\ which symbols are functions of other symbols, and which are functions only of constants. What I was \ looking for is a function that could work on each symbol's \replacement rules\ in such a way as to filter out those replacement rules which contain other symbols. I have never heard of DownValue before, I shall explore your b) suggestion with interest. Paul. -----Original Message----- === Subject: Re: listing user defined, independent variables a) what mean \Mathematica must 'know' which variables are functions of other symbols\. Variables functions of other symbols ?? what should that be ?? b) Start a fresh kernel and type blub[x_] := Module[{y, z}, x] and Names[\Global`*\] gives {\blub\, \x\, \x$\, \y\, \y$\, \z\, \z$\} The \*$\ symbols come from the Module[] and have th attribute Temporary and the \blub\ function has an DownValue[]. Since x,y,z appear in the down values of blub[] it is not possible to find out if there is also a global symbol with a that has the name \x\, \y\ or \z\. Jens > > > > I have a notebook in which there are over 1300 variables (symbols) defined. > The vast majority of these are dependent variables. I can get a list of them > all with Names[\Global`*\], but what I really want is a list of only \ the > independent variables. Is there any obvious way to do this? Mathematica must > \know\ which variables are functions of other symbols, so I was hoping that > there would be an \attribute\ of a dependent variable that I could use \ as a > filter on Names[]. Any thoughts? I am using V5.1. > > > > > > > Paul > > > > Dr. Paul A. Ellsmore > > > > Nanion Limited > > Oxford Centre for Innovation > > Mill Street > > Oxford > > United Kingdom > > OX2 0JX > > > > Tel: +44 (0) 1865 811175 > > Fax: +44 (0) 1865 248594 > > === Subject: Re: listing user defined, independent variables Hi Albert, heard of this function, but it is clearly the kind of thing I need. Unfortunately, your code doesn't quite do what i need. As an example, here are two \independent\ variables, indVarA and indVarB, and a \dependent\ variable, depVarC. I actually want to get at indVarA and indVarB, but your code seems to be aimed at getting depVarC: In[In[26]:= indVarA=1 indVarB=2 depVarC=indVarA*indVarB Out[26]= 1 Out[27]= 2 Out[28]= 2 Using your code: In[29]:= (*ensure that we can see the symbols, not only the values:*) In[30]:= SetAttributes[dependentQ, HoldFirst] In[31]:= (* if we get a symbol which has an OwnValue, extract the unevaluated RHS of its OwnValue and see whether it contains symbols from the Global context: *) In[32]:= dependentQ[var_Symbol] := If[TrueQ[Length[OwnValues[var]] > 0], Not[FreeQ[Extract[OwnValues[var], {1, 2}, Hold], s_Symbol /; Context[s] == \Global`\]], False ] In[33]:= (* as a filter for variable names, it is handy if we accept strings as arguments, too: *) In[34]:= dependentQ[name_String] := dependentQ @@ ToExpression[name, InputForm, Hold] In[35]:= (* use as filter: *) In[36]:= Select[Names[\Global`*\], dependentQ] We get a zero length list as output: Out[36]= {} I want to get indVarA and indVarB as output, but if I remove the \Not\ \ from your code, I get: In[37]:= SetAttributes[dependentQ, HoldFirst] dependentQ[var_Symbol] := If[TrueQ[Length[OwnValues[var]] > 0], FreeQ[Extract[OwnValues[var], {1, 2}, Hold], s_Symbol /; Context[s] == \Global`\], False ] dependentQ[name_String] := dependentQ @@ ToExpression[name, InputForm, Hold] Select[Names[\Global`*\], dependentQ] Out[40]= {depVarC,indVarA,indVarB} I am not entirely sure I understand your syntax, but I assume that we are trying to get OwnValues[var_Symbol], without the rhs being evaluated. I would hope to get OwnValues[depVarC] to be {HoldPattern[depVarC] :> indVarA + indVarB}, or something like that, but everything i try gives the \ evaluated rhs: In[41]:= SetAttributes[myExtract,HoldFirst] myExtract[var_Symbol]:=Extract[OwnValues[var], {1, 2}, Hold] In[43]:= myExtract[depVarC] Out[43]= Hold[2] If I can get the unevaluated rules for each synbol, using OwnValues or any other function, I will be able to do what I need. Any idea how to do this? Paul -----Original Message----- === Subject: Re: listing user defined, independent variables > > > > I have a notebook in which there are over 1300 variables (symbols) defined. > The vast majority of these are dependent variables. I can get a list of them > all with Names[\Global`*\], but what I really want is a list of only \ the > independent variables. Is there any obvious way to do this? Mathematica must > \know\ which variables are functions of other symbols, so I was hoping that > there would be an \attribute\ of a dependent variable that I could use \ as a > filter on Names[]. Any thoughts? I am using V5.1. I don't think that there is an attribute for that information. The internals of mathematica are mostly rule based, and OwnValues[] will give you the information which can be used to determine the dependencies that you are seeking. I could only think about a rather involved way to extract that information, since you need to be careful to not evaluate too early. The following is an approach to determine the dependencies: (*ensure that we can see the symbols, not only the values:*) SetAttributes[dependentQ, HoldFirst] (* if we get a symbol which has an OwnValue, extract the unevaluated RHS of its OwnValue and see whether it contains symbols from the Global context: *) dependentQ[var_Symbol] := If[TrueQ[Length[OwnValues[var]] > 0], Not[FreeQ[Extract[OwnValues[var], {1, 2}, Hold], s_Symbol /; Context[s] == \Global`\]], False ] (* as a filter for variable names, it is handy if we accept strings as arguments, too: *) dependentQ[name_String] := dependentQ @@ ToExpression[name, InputForm, Hold] (* use as filter: *) Select[Names[\Global`*\], dependentQ] It might well be that there are simpler and/or more efficient ways to do this, but I can't think of one now and it should be a starting point... hth, albert === Subject: SparseArray Storage Format Real32 I have a sparse tensor, dimensions {n, n, n+1}. The elements are machine reals. The elements, ranked by average density: 0, 85%; -10, 10%; and 10, 1%; the remainder are unique. Is there a good format available to save this type of data? I was just about to write a quick ArrayRules to RaffyForm function, but I figured there should be other Sparse Array formats. Neither .mtx nor .rua were helpful. Get[] is extremely slow. Example Data: RandomChoice[{85, 10, 1, 4} -> {0, -10, 10, 1}, {100, 100, 101}] /. {1 :> RandomReal[]} === Subject: Re: Series of Percentage Changes pchg[v_List, h_: \NA\] := Quiet@MapThread[Check[#1/#2 - 1, h] &, {Rest [v], Most[v]}]; === Subject: Re: Series of Percentage Changes Hi Gregory, you may use MapThread together with a function thta checks its arguments. E.g.: fun = If[NumericQ[#1] && NumericQ[#2], (#2 - #1)/#1, NA] &; MapThread[fun, {Most[theList], Rest[theList]}] hope this helps, Daniel > Hello everyone, > > We can transform a series to percentage changes by using > > (Differences@theList)/(Most@theList) > > or > > (Rest@theList/Most@theList) - 1 > > However, Mathematica will smartly difference symbols as well as > numeric values, so the difference of adjacent null elements will be > zero (Null - Null = 0), resulting in a percentage change of zero, and > so will adjacent elements with a string, such as \NA\ or \Missing\, > that denotes a missing value. The trouble is, you may want to have > missing values flagged in the resulting percentage change series just > as they were in the original series. > > to take care of missing values and instances of division by zero, but > I was wondering whether there is a more elegant way to incorporate the > conditions with functions such as Rest and Most and perhaps avoid the > use of the loop. > > percentageChange[theList_] := Module[{tmpList, tmpElements}, > (tmpList = Array[tmpElements, (Length@theList) - 1]; > Do[tmpList[[t - 1]] = > If[theList[[t - 1]] != 0 && NumberQ[theList[[t - 1]]] && > NumberQ[theList[[t]]], theList[[t]]/theList[[t - 1]] - 1, > \NA\], {t, > 2, Length@theList}]; > tmpList)]; > > > > Gregory > > === Subject: Re: Series of Percentage Changes Like this? data = {1.1, NA, 1.2, 1.3, \Missing\, 1.4, 1.5, 0, 1.6}; pctChange[{_, _}] := \not numeric\ pctChange[{0 | 0., _}] := \Zero Denominator\ pctChange[{previous_?NumericQ, current_?NumericQ}] := current/previous - 1 pctChange /@ Partition[data, 2, 1] {\not numeric\, \not numeric\, 0.0833333, \not numeric\, \not \\ numeric\, 0.0714286, -1, \Zero Denominator\} Bobby > Hello everyone, > > We can transform a series to percentage changes by using > > (Differences@theList)/(Most@theList) > > or > > (Rest@theList/Most@theList) - 1 > > However, Mathematica will smartly difference symbols as well as > numeric values, so the difference of adjacent null elements will be > zero (Null - Null = 0), resulting in a percentage change of zero, and > so will adjacent elements with a string, such as \NA\ or \Missing\, > that denotes a missing value. The trouble is, you may want to have > missing values flagged in the resulting percentage change series just > as they were in the original series. > > to take care of missing values and instances of division by zero, but > I was wondering whether there is a more elegant way to incorporate the > conditions with functions such as Rest and Most and perhaps avoid the > use of the loop. > > percentageChange[theList_] := Module[{tmpList, tmpElements}, > (tmpList = Array[tmpElements, (Length@theList) - 1]; > Do[tmpList[[t - 1]] = > If[theList[[t - 1]] != 0 && NumberQ[theList[[t - 1]]] && > NumberQ[theList[[t]]], theList[[t]]/theList[[t - 1]] - 1, > \NA\], {t, > 2, Length@theList}]; > tmpList)]; > > > > Gregory > > -- DrMajorBob@longhorns.com === Subject: Re: Series of Percentage Changes Hi Gregory, If[NumericQ[#1] && NumericQ[#2], 100 Subtract[##]/#1, NA] & @@@ Partition[theList, 2, 1] should work for you. You might add a minus sign to the 100 depending on which way you want the differences be calculated. > Hello everyone, > > We can transform a series to percentage changes by using > > (Differences@theList)/(Most@theList) > > or > > (Rest@theList/Most@theList) - 1 > > However, Mathematica will smartly difference symbols as well as > numeric values, so the difference of adjacent null elements will be > zero (Null - Null = 0), resulting in a percentage change of zero, and = > so will adjacent elements with a string, such as \NA\ or \Missing\, > that denotes a missing value. The trouble is, you may want to have > missing values flagged in the resulting percentage change series just > as they were in the original series. > > to take care of missing values and instances of division by zero, but > I was wondering whether there is a more elegant way to incorporate the = > conditions with functions such as Rest and Most and perhaps avoid the > use of the loop. > > percentageChange[theList_] := Module[{tmpList, tmpElements}, > (tmpList = Array[tmpElements, (Length@theList) - 1]; > Do[tmpList[[t - 1]] = > If[theList[[t - 1]] != 0 && NumberQ[theList[[t - 1]]] && > NumberQ[theList[[t]]], theList[[t]]/theList[[t - 1]] -= 1, > \NA\], {t, > 2, Length@theList}]; > tmpList)]; > > > Gregory === Subject: Re: Map and functional constructs to replace iterative statements > I have begun to replace Table, Do, While, or For, but in my thinking > with Map, Inner, Outer and other functional programming constructs as > I learn more about Mathematica. > > But, I'm stuck. I need to figure out how to use Map (or some related > approach) when a function needs both a current value and a previous > value in a time series, such as a percentage change function (or > perhaps more generally stated, when I need to refer to previous values > in a series or even previous calculations). But first a simple case: > > percentChange[currentValue_, previousValue_] := 100 * ( currentValue - > previousValue) / previousValue > > I know how to apply this iteratively, but how can I do it with Map or > some other functional construct? > > Say I have a list: timeSeries > > I thought to try something like this: > > Map[percentChange[?,?], timeSeries] > > but I don't know how what to put in for \?\. > > Any help much appreciated. > > Thx. > Maybe this is what you want: pc=RandomInteger[{1,9},10]; {100(#2-#1)/#1}& @@@ Partition[pc,2,1] -- _________________________________________________________________ Peter Breitfeld, Bad Saulgau, Germany -- http://www.pBreitfeld.de === Subject: Re: Map and functional constructs to replace iterative statements percentChange[previousValue_, currentValue_] := 100*(currentValue - previousValue)/previousValue timeSeries = Table[RandomReal[{-1, 1}], {10}] percentChange @@@ Partition[ timeSeries, 2, 1] ?? Jens > I have begun to replace Table, Do, While, or For, but in my thinking with \ Map, Inner, Outer and other functional programming constructs as I learn more \ about Mathematica. > > But, I'm stuck. I need to figure out how to use Map (or some related \ approach) when a function needs both a current value and a previous value in \ a time series, such as a percentage change function (or perhaps more \ generally stated, when I need to refer to previous values in a series or even \ previous calculations). But first a simple case: > > percentChange[currentValue_, previousValue_] := 100 * ( currentValue - \ previousValue) / previousValue > > I know how to apply this iteratively, but how can I do it with Map or some \ other functional construct? > > Say I have a list: timeSeries > > I thought to try something like this: > > Map[percentChange[?,?], timeSeries] > > but I don't know how what to put in for \?\. > > Any help much appreciated. > > Thx. > === Subject: Re: Map and functional constructs to replace iterative statements > I have begun to replace Table, Do, While, or For, but in my thinking with \ Map, Inner, Outer and other functional programming constructs as I learn more \ about Mathematica. > > But, I'm stuck. I need to figure out how to use Map (or some related \ approach) when a function needs both a current value and a previous value in \ a time series, such as a percentage change function (or perhaps more \ generally stated, when I need to refer to previous values in a series or even \ previous calculations). But first a simple case: > > percentChange[currentValue_, previousValue_] := 100 * ( currentValue - \ previousValue) / previousValue > > I know how to apply this iteratively, but how can I do it with Map or some \ other functional construct? > > Say I have a list: timeSeries > > I thought to try something like this: > > Map[percentChange[?,?], timeSeries] > > but I don't know how what to put in for \?\. > > Any help much appreciated. > This is one possibility do what you want: percentChange @@@ Partition[timeseries, 2, 1] Partition will create a list of pairs, @@@ is a short notation for Apply at level 1. You might want to look at the documentation for Partition and Apply for more details... hth, albert === Subject: Re: Map and functional constructs to replace iterative statements Look at Gergory's question \Series of Percentage Changes\ that by a cosmic coincidence appeared today. It seems to answer your question. But the following will also work -100* Subtract[##]/#1& @@@ Partition[timeSeries, 2, 1] Perhaps you should check for zero divisions. > I have begun to replace Table, Do, While, or For, but in my thinking with \ Map, Inner, Outer and other functional programming constructs as I learn more \ about Mathematica. > > But, I'm stuck. I need to figure out how to use Map (or some related \ approach) when a function needs both a current value and a previous value in \ a time series, such as a percentage change function (or perhaps more \ generally stated, when I need to refer to previous values in a series or even \ previous calculations). But first a simple case: > > percentChange[currentValue_, previousValue_] := 100 * ( currentValue - \ previousValue) / previousValue > > I know how to apply this iteratively, but how can I do it with Map or some \ other functional construct? > > Say I have a list: timeSeries > > I thought to try something like this: > > Map[percentChange[?,?], timeSeries] > > but I don't know how what to put in for \?\. > > Any help much appreciated. > > Thx. === Subject: Re: Map and functional constructs to replace iterative statements Here is a quick tutorial for 3 common commands: /@ (Map), @@@ (Apply), and MapThread f /@ {a, b, c} => { f[a], f[b], f[c] } => Map[f, {a, b, c}, {1}] f @@@ { {a, 1}, {b, 2}, {c, 3} } => { f[a, 1], f[b, 2], f[c, 3] } => Apply[f, {...}, {2}] MapThread[f, { {a, b, c}, {1, 2, 3} }] => { f[a,1], f[b, 2], f[c, 3]} Map is like replacing a value x with f(x). f /@ { a, {1, 2} } => { f [a], f[{1, 2}] } @@@ replaces all the heads at level 2 with f. A matrix, List[List [1,2], List[3,4]] becomes List[ f[1,2], f[3,4] ] Using anonymous functions with Map, @@@, and MapThread MapThread lets you build a list of length n, from other lists of length n, where each element calls f as: f[ element of first list, element of second list .... ] => f[#1, #2, ...] When you these commands with anonymous functions, you can write very concise code. MapThread[ If[#1>#2, #3 > #2, #3 <= 2]&, { {1,2}, {3,4}, {5, 6} } ] Print[#1,\ = \,#2]& @@@ { {\A\, 2}, {\B\, 3}, {\D\, 4} }; {Length[#], Total[#]} /@ { {}, {1, 3}, {9, 4, 5, 2} } === Subject: Re: Map and functional constructs to replace iterative statements Hi Andreas, there are several solutions, but I think the most elegant is using vectors. E.g. assuming your data is in \d\ 100 (Rest[d]-Most[d])/Most[d] hope this helps, Daniel > I have begun to replace Table, Do, While, or For, but in my thinking with \ Map, Inner, Outer and other functional programming constructs as I learn more \ about Mathematica. > > But, I'm stuck. I need to figure out how to use Map (or some related \ approach) when a function needs both a current value and a previous value in \ a time series, such as a percentage change function (or perhaps more \ generally stated, when I need to refer to previous values in a series or even \ previous calculations). But first a simple case: > > percentChange[currentValue_, previousValue_] := 100 * ( currentValue - \ previousValue) / previousValue > > I know how to apply this iteratively, but how can I do it with Map or some \ other functional construct? > > Say I have a list: timeSeries > > I thought to try something like this: > > Map[percentChange[?,?], timeSeries] > > but I don't know how what to put in for \?\. > > Any help much appreciated. > > Thx. > === Subject: Re: Inverse of a Big Matrix Ho Gregory, look up \PseudoInverse\ in the manual. Daniel > Hello everyone, > > I'm computing the inverse of a big matrix, 500 x 500. Well, maybe not > that big, but I'm getting the error message > > \General::luc: Result for `1` of badly conditioned matrix `2` may \ > contain significant numerical errors. >>\ > > and I'm wondering if anyone can suggest a workaround. All I can say > is that the determinant is very small (-4.327475016428501*10^-1947), > and that I can compute the inverse of various submatrices of size 100 > x100. > > > Gregory > === Subject: Re: Inverse of a Big Matrix This has nothing to do with the size of your matrix. Inverse[{{1., 1.}, {0.99999999999999, 1}}] also yields the same error. The warning is simply informing you that small changes in the input can have a major impact on the result and that you should be very cautious proceeding with it. > Hello everyone, > > I'm computing the inverse of a big matrix, 500 x 500. Well, maybe not > that big, but I'm getting the error message > > \General::luc: Result for `1` of badly conditioned matrix `2` may \ > contain significant numerical errors. >>\ > > and I'm wondering if anyone can suggest a workaround. All I can say > is that the determinant is very small (-4.327475016428501*10^-1947), > and that I can compute the inverse of various submatrices of size 100 > x100. > > > Gregory === Subject: Re: Eigensystem[hermitianMatrix] sometimes returns non-orthonormal > > In Mathematica 7.0.0 (for Linux), calling Eigenvectors[H] or \ Eigensystem[H] > for a numerical Hermitian matrix H sometimes returns eigenvectors that \ are > not orthonormal. > This happens when some eigenvalues are degenerate. (I can supply example > code that illustrates the problem, if necessary.) > > This is not really a bug -- the documentation for Eigensystem[] doesn't \ make > any guarantees of orthonormality -- but nevertheless it is an annoying \ part > of Mathematica's design. > This issue has been raised 11 years ago ( > http://forums.wolfram.com/mathgroup/archive/1998/Mar/msg00418.html ), but > that post is corrupted! (Surely Wolfram isn't resorting to censorship?) A non-corrupted version is located at the URL below. http://forums.wolfram.com/mathgroup/archive/1998/Mar/msg00425.html Note that the behavior in that report was of a more serious nature than that which you describe (eigenvectors sometimes had complex values). > I > was hoping that in Mathematica 7 I would be able to write something like > > Eigensystem[H, Method->\LAPACK-ZHEEVR\] > > or > > Eigensystem[H, OrthonormalizeEigenvectors->True] > > but no such options seem to exist. One workaround is to apply > Orthogonalize[] to the matrix of eigenvectors, but the documentation for > Orthogonalize[] doesn't guarantee that the orthonormalization will only > occur within the \degenerate subspace\. So one has to resort to \ complicated > fixes (e.g., http://arxiv.org/pdf/hep-ph/9607313 ). > Does anyone have a simpler solution? (For example, is there an easy way \ to > call LAPACK'S ZHEEVR routine, which guarantees orthornormal eigenvectors, > from Mathematica?) > > Yen Lee Loh If you apply QRDecomposition to the eigenvectors, then I believe the Q part will provide what you are looking for. Daniel Lichtblau Wolfram Research === Subject: Re: Eigensystem[hermitianMatrix] sometimes returns non-orthonormal h = [a certain 3x3 hermitian matrix] {u, d} = Eigensystem[h]; d=DiagonalMatrix[d] The eigenvalue equation is satisfied, as per the specifications: h.Transpose[u] - Transpose[u].d == 0. The eigenvectors are normalized, but not orthonormal: u.ConjugateTranspose[u] != IdentityMatrix[3]. If we compute the q part of the QRDecomposition, q = First@QRDecomposition[u] , then q.ConjugateTranspose[q] == IdentityMatrix[3], but h.Transpose[q] - Transpose[q].d ==0, so the eigenvalue equation is no longer satisfied. q =Transpose@First @QRDecomposition[Transpose@u] doesn't work either. I haven't analysed things in detail, but since the task at hand is to \orthogonalize only the sets of eigenvectors u corresponding to degenerate eigenvalues\, it may not be safe to use an approach (Orthogonalize/QRDecomposition) that doesn't \know\ about the pattern of eigenvalues. Of course one can write a program beginning with degenEigvalIndices=Split[Sort[d]] and then calling Orthogonalize within each set, but this is kinda messy. I'm wondering if it is actually easier to do the calculation in Fortran/C++ and use MathLink, somehow. Does Wolfram have any plans to add support for orthonormal eigenvectors? Out of interest, does anyone know WHY Eigensystem can returns non-orthonormal eigenvectors? I was under the impression that \ Eigensystem[] first checks to see if the matrix is Hermitian, and if it is, it uses LAPACK-based algorithms for Hermitian matrices. I thought LAPACK's algorithms involved tridiagonalization followed by some form of QR factorization/divide-and-conquer Givens rotations, in which the eigenvector matrix started off as the identity matrix and accumulated successive \ unitary transformations, thus remaining unitary at every stage; I'm curious how Eigensystem[] even manages to break orthonormality at all. already normalized --- the problem is that they're not mutually orthogonal, which seems to be trickier to fix. p.p.s. Sorry this post is rather badly written. Maybe when the final solution appears I will summarize things properly for the benefit of future readers. > >> >> In Mathematica 7.0.0 (for Linux), calling Eigenvectors[H] or >> Eigensystem[H] >> for a numerical Hermitian matrix H sometimes returns eigenvectors that \ are >> not orthonormal. >> This happens when some eigenvalues are degenerate. (I can supply \ example >> code that illustrates the problem, if necessary.) >> >> This is not really a bug -- the documentation for Eigensystem[] doesn't >> make >> any guarantees of orthonormality -- but nevertheless it is an annoying >> part >> of Mathematica's design. >> This issue has been raised 11 years ago ( >> http://forums.wolfram.com/mathgroup/archive/1998/Mar/msg00418.html ), \ but >> that post is corrupted! (Surely Wolfram isn't resorting to censorship?) >> > > A non-corrupted version is located at the URL below. > > http://forums.wolfram.com/mathgroup/archive/1998/Mar/msg00425.html > > Note that the behavior in that report was of a more serious nature than > that which you describe (eigenvectors sometimes had complex values). > > > I >> was hoping that in Mathematica 7 I would be able to write something like >> >> Eigensystem[H, Method->\LAPACK-ZHEEVR\] >> >> or >> >> Eigensystem[H, OrthonormalizeEigenvectors->True] >> >> but no such options seem to exist. One workaround is to apply >> Orthogonalize[] to the matrix of eigenvectors, but the documentation for >> Orthogonalize[] doesn't guarantee that the orthonormalization will only >> occur within the \degenerate subspace\. So one has to resort to >> complicated >> fixes (e.g., http://arxiv.org/pdf/hep-ph/9607313 ). >> Does anyone have a simpler solution? (For example, is there an easy way >> to >> call LAPACK'S ZHEEVR routine, which guarantees orthornormal \ eigenvectors, >> from Mathematica?) >> >> Yen Lee Loh >> > > If you apply QRDecomposition to the eigenvectors, then I believe the Q \ part > will provide what you are looking for. > > > Daniel Lichtblau > Wolfram Research > > > -- Yen Lee Loh Postdoctoral Associate, The Ohio State University Home: 544 Stinchcomb Dr Apt 10, Columbus OH 43202-1728, USA Office: 2043 Physics Research Building, 191 W Woodruff Ave, Columbus OH 43210-1117, USA Office phone: +1 614 247 4772 Mobile phone: +1 765 532 9457 Email: yloh@mps.ohio-state.edu Web: \ http://www.physics.ohio-state.edu/~yloh/ === Subject: Re: Eigensystem[hermitianMatrix]sometimes returns I suppose the simplest thing is Normalize/@Eigenvalues[m] or {First@#,Normalize/@Last@#}&@Eigensystem[m] Bobby > > In Mathematica 7.0.0 (for Linux), calling Eigenvectors[H] or > Eigensystem[H] > for a numerical Hermitian matrix H sometimes returns eigenvectors that > are > not orthonormal. > This happens when some eigenvalues are degenerate. (I can supply example > code that illustrates the problem, if necessary.) > > This is not really a bug -- the documentation for Eigensystem[] doesn't > make > any guarantees of orthonormality -- but nevertheless it is an annoying > part > of Mathematica's design. > This issue has been raised 11 years ago ( > http://forums.wolfram.com/mathgroup/archive/1998/Mar/msg00418.html ), but > that post is corrupted! (Surely Wolfram isn't resorting to > censorship?) I > was hoping that in Mathematica 7 I would be able to write something like > > Eigensystem[H, Method->\LAPACK-ZHEEVR\] > > or > > Eigensystem[H, OrthonormalizeEigenvectors->True] > > but no such options seem to exist. One workaround is to apply > Orthogonalize[] to the matrix of eigenvectors, but the documentation for > Orthogonalize[] doesn't guarantee that the orthonormalization will only > occur within the \degenerate subspace\. So one has to resort to > complicated > fixes (e.g., http://arxiv.org/pdf/hep-ph/9607313 ). > Does anyone have a simpler solution? (For example, is there an easy way \ > to > call LAPACK'S ZHEEVR routine, which guarantees orthornormal eigenvectors, > from Mathematica?) > > Yen Lee Loh > > -- DrMajorBob@longhorns.com === Subject: Re: Difference Fit vs. Correlation NOT the coefficient of a linear fit. The correlation between two variables can have values between -1 and +1, with 0 indicating no (linear) relationship between them and 1 perfect linear relationship. The coefficient of x in the fit is not restricted to this range. Evidently, there is no reason for them to be equal. > in the code below, using Correlation I get 0.501338, using Fit I get > 0.514093. > How come? > > Claus > > In[47]:= GaltonX = {65.04851`, 63.25094`, 64.95532`, 65.7525`, > 61.13723`, 63.02254`, 65.37053`, 64.72398`, 66.06509`, 66.96738`, > 59.008`, 62.93203`, 63.67063`, 64.07386`, 64.68851`, 65.15466`, > 66.37353`, 65.57704`, 67.36765`, 66.75929`, 67.79764`, 69.5348`, > 62.54014`, 63.81016`, 64.4565`, 64.9665`, 64.70662`, 65.73829`, > 65.50141`, 65.55416`, 66.90294`, 66.57388`, 66.53198`, 67.90613`, > 68.29198`, 67.74123`, 68.46917`, 69.38327`, 71.81791`, 62.41615`, > 64.49083`, 64.4876`, 63.92303`, 65.44592`, 65.02977`, 65.67038`, > 68.66078`, 66.54597`, 64.85954`, 69.60692`, 64.8135`, 65.32703`, > 65.83169`, 65.83427`, 65.56135`, 65.8688`, 65.77339`, 67.09116`, > 66.61374`, 67.41075`, 67.27716`, 66.61134`, 68.17412`, 67.80555`, > 68.32529`, 68.07787`, 68.96795`, 68.9255`, 69.60862`, 70.35646`, > 70.00643`, 72.75425`, 62.82147`, 62.86855`, 63.91261`, 64.54118`, > 64.51906`, 66.02688`, 65.81011`, 66.01812`, 65.53742`, 65.73346`, > 66.77424`, 66.67869`, 66.97585`, 66.94021`, 66.84575`, 67.12008`, > 67.74181`, 68.27194`, 67.60691`, 68.44737`, 67.65832`, 68.71193`, > 69.32025`, 68.7403`, 69.13395`, 69.34995`, 68.6297`, 69.58258`, > 70.39517`, 71.19284`, 70.82429`, 71.65367`, 73.28133`, 63.03753`, > 63.66428`, 65.38311`, 64.60205`, 66.40661`, 65.76985`, 65.66729`, > 66.05712`, 66.54635`, 66.5723`, 66.64876`, 67.71899`, 68.48726`, > 67.82769`, 67.55801`, 68.07763`, 69.16715`, 68.693`, 68.61779`, > 68.64797`, 68.61666`, 70.36485`, 70.0099`, 70.13984`, 70.2073`, > 71.28063`, 70.90445`, 72.19036`, 74.96203`, 64.88218`, 65.55174`, > 65.65889`, 65.92826`, 65.94198`, 67.43646`, 67.48444`, 67.61344`, > 68.4518`, 68.49456`, 68.1056`, 69.48308`, 69.07389`, 69.39251`, > 69.44294`, 69.52131`, 70.15463`, 69.86911`, 70.44394`, 70.85393`, > 71.30074`, 72.13978`, 72.19045`, 75.43393`, 64.51788`, 66.36335`, > 65.56855`, 66.78957`, 66.91193`, 68.1714`, 67.50102`, 67.83492`, > 68.95255`, 69.26`, 68.74223`, 69.74288`, 70.29942`, 70.04402`, > 70.23559`, 70.88075`, 71.19091`, 72.37396`, 73.03345`, 74.8083`, > 67.39521`, 67.31523`, 67.77952`, 69.33827`, 68.72404`, 69.98991`, > 69.75383`, 70.65942`, 71.10882`, 72.4811`, 72.4801`, 67.52214`, > 68.23931`, 68.7997`, 69.89568`, 71.48641`, 70.76482`, 71.9137`, > 63.08399`, 68.23241`, 70.05787`, 70.83996`, 72.56944`, 67.93353`, > 67.54033`, 72.79855`, 62.67482`, 68.19196`, 65.07215`, 73.42952`, > 62.94125`, 62.53667`, 69.90248`, 71.07217`, 71.11059`, 69.48402`, > 70.18338`, 65.46124`, 62.04073`, 63.60063`, 65.60613`, 68.02969`, > 61.81571`, 63.78886`, 64.89023`, 65.79072`, 66.42371`, 68.80877`, > 61.76521`, 64.30302`, 63.69064`, 64.99662`, 65.34899`, 64.81278`, > 65.71736`, 66.03148`, 67.04912`, 67.77522`, 69.04964`, 62.1833`, > 62.76393`, 63.88391`, 65.41055`, 64.62347`, 65.64621`, 66.16257`, > 65.99538`, 65.79786`, 67.42936`, 67.11933`, 67.32907`, 67.86233`, > 68.31609`, 67.96359`, 68.68615`, 71.18085`, 62.4296`, 62.88524`, > 64.07313`, 63.88597`, 64.8272`, 65.39653`, 64.77344`, 68.66581`, > 65.19783`, 64.32621`, 66.08278`, 69.01679`, 64.50194`, 66.07654`, > 65.73631`, 66.45485`, 65.63018`, 66.39423`, 67.33687`, 66.83938`, > 66.69739`, 67.34708`, 67.35319`, 67.93575`, 67.76608`, 68.11569`, > 68.2548`, 68.83427`, 69.40758`, 69.32068`, 70.48`, 70.06429`, > 70.63764`, 62.41134`, 63.15274`, 63.51409`, 63.91446`, 64.61683`, > 64.86185`, 65.91332`, 66.1992`, 66.45978`, 65.50286`, 66.87795`, > 67.0791`, 66.83256`, 67.18231`, 66.51763`, 66.95295`, 66.63586`, > 68.18453`, 67.60565`, 68.27918`, 67.97994`, 69.00094`, 69.31139`, > 68.88641`, 68.94824`, 69.42186`, 69.49516`, 70.34647`, 69.92358`, > 70.69078`, 70.56571`, 72.40997`, 72.47685`, 62.72118`, 63.9001`, > 64.50433`, 64.81813`, 65.37582`, 65.82612`, 66.29436`, 65.81042`, > 66.80854`, 67.16724`, 67.30525`, 67.54577`, 67.86855`, 68.35003`, > 67.60818`, 68.48397`, 68.56724`, 69.07405`, 68.56831`, 69.15373`, > 68.60744`, 68.5443`, 69.65536`, 70.41632`, 69.97528`, 70.26613`, > 71.31667`, 71.29178`, 72.59442`, 64.40268`, 64.9127`, 66.34756`, > 66.04291`, 65.69477`, 66.71512`, 66.64971`, 68.33241`, 67.94335`, > 67.96734`, 68.27657`, 68.75008`, 69.05441`, 69.00755`, 69.39488`, > 69.7628`, 69.6464`, 70.45427`, 69.89852`, 70.984`, 71.22015`, > 71.45442`, 71.60966`, 73.20296`, 63.89132`, 65.99384`, 66.0424`, > 67.47658`, 66.68527`, 68.27034`, 67.72898`, 68.28372`, 68.39453`, > 69.12925`, 69.10844`, 69.74196`, 69.9987`, 69.56148`, 69.97779`, > 70.88691`, 70.64687`, 72.26404`, 71.50569`, 73.01402`, 66.20254`, > 67.26312`, 67.8086`, 69.08284`, 69.35107`, 69.59962`, 70.08948`, > 70.18385`, 71.26955`, 72.07717`, 72.33894`, 67.06776`, 67.85929`, > 69.07274`, 69.59893`, 69.73728`, 70.54066`, 72.40962`, 72.78889`, > 68.10144`, 68.6106`, 71.293`, 72.09445`, 74.69236`, 71.16246`, > 68.30804`, 60.41857`, 63.94459`, 63.06849`, 63.98036`, 73.89524`, > 72.03687`, 61.02471`, 65.39914`, 71.96564`, 71.29643`, 65.15837`, > 68.90263`, 64.45192`, 63.99469`, 66.46124`, 67.12556`, 62.27941`, > 63.8488`, 65.43612`, 65.62145`, 66.16956`, 67.62675`, 60.21393`, > 62.99378`, 63.57239`, 65.15088`, 65.13462`, 64.79732`, 66.24856`, > 66.22743`, 66.6056`, 67.99167`, 69.04862`, 62.12902`, 63.16227`, > 64.45497`, 63.75483`, 64.63959`, 64.59106`, 66.06003`, 65.98544`, > 65.66176`, 67.11501`, 67.31302`, 67.16149`, 68.38679`, 67.64175`, > 67.55466`, 68.53614`, 70.02702`, 61.07412`, 62.72387`, 64.28642`, > 64.11073`, 63.68318`, 64.68393`, 64.66753`, 67.95848`, 64.60933`, > 66.07775`, 65.25267`, 69.67201`, 65.33965`, 65.54375`, 66.1112`, > 66.22968`, 66.00879`, 66.03248`, 65.94624`, 67.09734`, 66.98893`, > 67.38837`, 67.4075`, 67.31108`, 68.27151`, 68.33586`, 67.56752`, > 68.23182`, 69.07604`, 68.77033`, 70.49154`, 70.00767`, 69.52007`, > 61.50617`, 62.93875`, 64.10318`, 63.85157`, 65.08731`, 64.62588`, > 65.8912`, 66.24386`, 65.66031`, 66.05344`, 66.30711`, 67.15303`, > 66.90986`, 66.89436`, 66.56566`, 67.23789`, 67.05684`, 67.94515`, > 67.94026`, 67.84234`, 67.91887`, 68.63961`, 68.60477`, 69.04036`, > 69.03336`, 69.12497`, 68.53779`, 70.24335`, 69.84308`, 69.90057`, > 71.48946`, 72.37013`, 71.94413`, 61.01904`, 63.0108`, 64.5793`, > 65.39658`, 64.84995`, 65.54542`, 65.56421`, 66.09747`, 67.40602`, > 66.5839`, 67.41035`, 67.21634`, 68.23175`, 67.88053`, 68.0153`, > 67.69332`, 68.85462`, 68.73264`, 69.0711`, 68.79964`, 68.79876`, > 69.32241`, 69.60923`, 69.76071`, 70.1611`, 70.12109`, 71.10802`, > 71.44164`, 71.75006`, 64.35591`, 65.16253`, 66.09529`, 65.78674`, > 65.53927`, 66.71703`, 67.17284`, 67.16853`, 68.06061`, 67.85988`, > 68.1968`, 69.29537`, 68.84067`, 69.18095`, 68.69659`, 69.45833`, > 70.0483`, 69.6916`, 70.20658`, 70.79086`, 70.87977`, 71.30702`, > 72.3266`, 72.7824`, 64.40052`, 64.89121`, 65.84506`, 67.35461`, > 67.44953`, 67.86439`, 67.92443`, 68.49998`, 67.60602`, 69.37288`, > 69.34931`, 69.48306`, 70.21887`, 70.02161`, 69.83698`, 69.6041`, > 71.49829`, 72.16894`, 72.41045`, 72.52521`, 64.6702`, 66.78417`, > 67.83401`, 68.15907`, 69.19301`, 68.86739`, 70.11126`, 70.12007`, > 71.03691`, 71.43196`, 72.04564`, 72.738`, 68.02564`, 69.04939`, > 68.86356`, 69.63421`, 71.24085`, 71.95679`, 72.89983`, 65.86028`, > 68.48883`, 70.72676`, 72.34582`, 72.59922`, 68.82986`, 73.49987`, > 70.0599`, 67.9291`, 64.66998`, 60.7795`, 74.94058`, 70.64925`, > 60.91526`, 65.28934`, 71.362`, 71.66893`, 62.68868`, 71.39326`, > 66.56302`, 67.18788`, 62.532`, 64.85512`, 66.94161`, 62.3603`, > 63.58145`, 65.44633`, 65.00539`, 66.43717`, 66.6676`, 59.4898`, > 63.00108`, 64.0892`, 64.0753`, 64.52103`, 65.19231`, 66.30604`, > 66.03081`, 66.83096`, 68.19724`, 68.6599`, 61.29369`, 63.26089`, > 63.86162`, 64.13176`, 64.81105`, 64.55987`, 66.19437`, 66.5`, > 66.43436`, 67.30468`, 67.36559`, 67.29162`, 67.69874`, 68.38221`, > 67.76712`, 69.29587`, 69.66477`, 60.03436`, 62.1356`, 63.64047`, > 63.82278`, 64.46555`, 64.73798`, 65.43021`, 65.07381`, 69.29517`, > 67.67996`, 64.94267`, 69.47933`, 65.05963`, 65.01253`, 65.61963`, > 65.94819`, 65.68803`, 65.87689`, 65.91481`, 67.41946`, 66.53833`, > 67.41995`, 67.21977`, 67.33721`, 68.11283`, 68.02017`, 68.02829`, > 68.35139`, 68.80254`, 69.49307`, 70.2297`, 69.71997`, 70.16651`, > 61.07369`, 62.66947`, 64.32254`, 64.27362`, 64.96148`, 64.77222`, > 66.2365`, 66.10686`, 66.42772`, 66.22727`, 65.87574`, 67.03017`, > 67.48545`, 66.7367`, 66.69181`, 67.31766`, 67.1219`, 67.82592`, > 68.4376`, 67.74551`, 68.0934`, 67.71665`, 68.99349`, 69.24616`, > 69.2828`, 69.26254`, 68.75605`, 69.62519`, 69.61942`, 69.94715`, > 70.58916`, 72.34058`, 71.56142`, 72.94457`, 63.33777`, 64.3445`, > 65.14077`, 65.2424`, 65.90397`, 65.98763`, 65.57065`, 65.82733`, > 66.88576`, 66.98594`, 67.41537`, 67.93319`, 67.77812`, 68.44999`, > 68.32281`, 68.35148`, 68.73678`, 68.97673`, 69.31931`, 68.80442`, > 68.90434`, 69.80381`, 69.66712`, 70.38052`, 70.29892`, 71.02634`, > 71.28432`, 72.03259`, 63.26539`, 64.87623`, 65.72722`, 66.13831`, > 66.48902`, 66.06395`, 66.73532`, 67.12329`, 67.57161`, 68.18286`, > 68.33868`, 68.14658`, 69.17022`, 69.17597`, 68.52789`, 68.84874`, > 69.69833`, 69.86528`, 70.48646`, 71.16238`, 70.58946`, 70.54353`, > 72.38576`, 73.18522`, 64.12344`, 64.62855`, 65.74244`, 67.11563`, > 66.81497`, 68.38001`, 68.33835`, 68.25066`, 68.36488`, 68.67873`, > 68.70293`, 69.0466`, 70.17375`, 69.86849`, 70.15821`, 70.24204`, > 71.41811`, 70.66031`, 72.42614`, 73.04341`, 64.6891`, 67.09928`, > 67.79858`, 68.37299`, 69.19364`, 68.5938`, 69.86969`, 70.17952`, > 70.51811`, 71.00743`, 71.83086`, 72.81121`, 67.95451`, 67.81317`, > 69.32812`, 70.45127`, 71.38916`, 72.31022`, 71.8821`, 64.61601`, > 67.75382`, 69.90335`, 70.87039`, 72.71533`, 69.03942`, 72.44463`, > 69.07253`, 70.1758`, 72.37219`, 59.63777`, 73.27737`, 68.12621`, > 63.15234`, 66.00489`, 71.45303`, 68.1456`, 65.25527`, 70.41584`, > 68.38452`, 61.89133`, 64.98391`, 66.21887`, 59.48391`, 62.77645`, > 63.86507`, 64.56486`, 65.60265`, 66.28333`, 70.55256`, 62.14539`, > 64.37906`, 64.35191`, 64.91304`, 65.33085`, 65.17545`, 66.10285`, > 66.05004`, 67.38231`, 67.83999`, 70.27309`, 63.19263`, 63.66834`, > 64.12671`, 64.71388`, 65.14662`, 65.94428`, 65.67785`, 65.95134`, > 67.30819`, 66.69404`, 66.56885`, 66.80951`, 68.24011`, 67.5344`, > 68.4157`, 69.09588`, 70.81036`, 61.68183`, 63.04493`, 64.34945`, > 63.89336`, 65.48176`, 64.726`, 64.65128`, 67.47271`, 66.76701`, > 64.98147`, 69.38684`, 63.7123`, 64.63358`, 66.00037`, 65.96621`, > 66.49751`, 66.27177`, 65.67892`, 66.86814`, 66.73495`, 66.53357`, > 67.05051`, 67.04958`, 67.55908`, 67.58076`, 67.51942`, 68.12592`, > 68.57465`, 68.52484`, 69.20286`, 69.7551`, 69.91868`, 70.50329`, > 62.83528`, 63.24504`, 64.44602`, 64.31819`, 64.73521`, 64.72352`, > 65.97741`, 65.63739`, 65.83449`, 65.87064`, 66.61001`, 66.75821`, > 66.77012`, 67.21373`, 67.09047`, 66.93359`, 68.03852`, 67.98476`, > 68.25046`, 68.26078`, 68.21235`, 68.54029`, 68.50469`, 69.13248`, > 69.21981`, 69.34385`, 69.41153`, 70.25056`, 69.68641`, 70.51091`, > 71.29598`, 72.20218`, 72.33929`, 62.91628`, 63.93525`, 64.59851`, > 65.47401`, 65.864`, 66.30684`, 65.77587`, 66.48386`, 67.31983`, > 67.39901`, 67.05939`, 68.45161`, 67.7061`, 68.08389`, 67.58923`, > 67.80388`, 69.25919`, 69.05302`, 68.70921`, 69.02788`, 68.94943`, > 68.81536`, 69.91801`, 70.45072`, 69.96349`, 69.75787`, 71.38281`, > 71.08122`, 72.74936`, 65.26855`, 66.01549`, 65.5142`, 65.62374`, > 65.92199`, 67.11129`, 66.89727`, 67.94195`, 67.7274`, 67.54999`, > 67.96013`, 68.83038`, 69.43917`, 68.55957`, 69.10638`, 70.4814`, > 69.92992`, 70.04238`, 69.56779`, 71.01077`, 70.62603`, 71.46383`, > 71.62112`, 73.87758`, 65.00573`, 66.30354`, 65.86743`, 66.86667`, > 67.15958`, 68.06904`, 67.57382`, 67.63354`, 69.41356`, 68.87192`, > 69.07779`, 69.81177`, 70.01463`, 69.56649`, 70.254`, 70.68296`, > 70.87874`, 72.45099`, 73.04359`, 74.40915`, 67.40139`, 66.53122`, > 68.04593`, 68.82772`, 69.33069`, 70.34676`, 70.173`, 70.80883`, > 70.7029`, 72.35959`, 72.3661`, 67.17534`, 67.84045`, 68.9053`, > 70.3752`, 71.18523`, 71.41254`, 71.70673`, 72.60072`, 67.57652`, > 68.55814`, 70.95019`, 71.99783`, 75.17469`, 73.07157`, 69.92407`, > 65.54323`, 72.56261`, 72.15051`, 63.22006`, 73.2645`, 65.81296`, > 67.70657`, 66.99681`, 71.33181`, 71.78314`, 70.73837`, 70.30609`}= ; > > In[59]:= GaltonY = {59.77827`, 63.21404`, 63.34242`, 62.79238`, > 64.28113`, 64.24221`, 64.08231`, 63.99574`, 64.61338`, 63.97944`, > 65.24451`, 65.35102`, 65.67992`, 65.43664`, 65.29391`, 64.79017`, > 65.01881`, 65.5464`, 65.08145`, 65.49008`, 65.1352`, 65.51262`, > 66.58436`, 66.37842`, 66.14782`, 65.97259`, 65.95887`, 66.45202`, > 65.74797`, 65.97164`, 65.90548`, 65.90773`, 66.47103`, 65.75023`, > 66.34666`, 66.08577`, 66.28037`, 66.34354`, 66.41711`, 67.22558`, > 67.46394`, 66.99362`, 66.76647`, 67.0342`, 66.84316`, 69.2989`, > 69.09114`, 61.66358`, 65.7288`, 68.98012`, 67.37397`, 67.17459`, > 67.06712`, 67.29446`, 67.62665`, 67.47923`, 66.92162`, 67.58324`, > 67.21191`, 66.81629`, 67.24268`, 67.51036`, 67.57026`, 67.17258`, > 67.54129`, 67.37113`, 67.59714`, 67.25104`, 66.82533`, 66.72679`, > 66.92996`, 67.64847`, 68.04291`, 68.4885`, 68.04777`, 68.34573`, > 68.33829`, 68.3138`, 68.18333`, 68.51056`, 68.12014`, 68.31563`, > 68.04774`, 68.61273`, 67.9425`, 68.08381`, 68.36754`, 67.85181`, > 68.19806`, 68.01897`, 68.23431`, 67.89742`, 68.62409`, 67.97912`, > 68.2668`, 67.94192`, 68.62072`, 68.23857`, 68.58554`, 68.06568`, > 68.38188`, 67.75943`, 68.59991`, 67.91483`, 67.83861`, 68.77562`, > 69.60782`, 69.69143`, 69.41491`, 69.68931`, 69.20775`, 69.45627`, > 69.59614`, 69.27994`, 69.52338`, 68.74406`, 69.30987`, 69.22571`, > 69.24073`, 69.4912`, 69.11921`, 68.93751`, 69.45774`, 69.27599`, > 69.22869`, 68.70547`, 69.34638`, 68.87137`, 69.30262`, 69.1579`, > 69.62727`, 69.11014`, 69.09596`, 69.03281`, 69.85677`, 70.06274`, > 69.89765`, 70.26185`, 70.52663`, 70.52744`, 69.7865`, 70.36684`, > 69.97604`, 69.83308`, 70.69951`, 70.16871`, 70.11632`, 69.95433`, > 70.31279`, 69.80903`, 69.96792`, 69.93939`, 69.73486`, 70.08397`, > 70.01015`, 70.65025`, 70.01253`, 70.09077`, 71.34319`, 70.81542`, > 71.44929`, 71.18676`, 71.66276`, 71.39516`, 70.73612`, 71.2608`, > 71.04721`, 71.2592`, 70.89486`, 71.31732`, 71.55712`, 71.17701`, > 71.03412`, 71.37275`, 71.64741`, 71.1205`, 70.91756`, 71.66455`, > 72.39198`, 71.87928`, 72.34482`, 72.17265`, 72.52078`, 71.98836`, > 72.34482`, 72.45347`, 72.26945`, 71.96844`, 72.18169`, 72.7864`, > 73.0414`, 72.87858`, 73.17304`, 73.63274`, 72.88245`, 73.18148`, > 74.3209`, 74.40727`, 73.76791`, 73.92119`, 73.75503`, 75.56214`, > 75.70222`, 77.21338`, 61.28882`, 74.28343`, 70.93102`, 75.34802`, > 61.78758`, 64.00009`, 62.4658`, 73.70465`, 66.3495`, 62.20543`, > 65.421`, 63.9922`, 62.78458`, 63.52486`, 63.49966`, 62.89658`, > 63.72784`, 63.73231`, 64.39579`, 63.70072`, 64.44796`, 64.2795`, > 65.18412`, 65.10118`, 65.56277`, 64.94454`, 65.14227`, 65.16843`, > 65.58149`, 65.63474`, 64.87191`, 65.4176`, 64.7231`, 65.84559`, > 65.77333`, 66.67371`, 66.54726`, 66.43228`, 66.3326`, 66.24935`, > 66.39759`, 66.69366`, 66.22114`, 66.43499`, 66.65758`, 65.76873`, > 66.20784`, 66.30166`, 65.81894`, 66.34562`, 66.88369`, 66.8162`, > 67.36245`, 67.68308`, 67.19885`, 67.26903`, 67.45131`, 68.95907`, > 62.013`, 64.10658`, 66.00879`, 65.77796`, 66.94446`, 66.81229`, > 67.01431`, 67.43705`, 66.8442`, 67.25391`, 67.52273`, 67.17782`, > 67.6068`, 66.8991`, 66.74675`, 67.16928`, 67.23833`, 66.75589`, > 66.79828`, 67.488`, 67.1104`, 67.06455`, 66.93899`, 67.54723`, > 66.85662`, 67.70971`, 67.88296`, 68.66534`, 68.58164`, 68.44493`, > 68.41199`, 68.44665`, 68.38258`, 67.92987`, 68.3033`, 67.97479`, > 68.18304`, 68.57984`, 68.56974`, 67.81854`, 67.8796`, 68.22794`, > 68.01258`, 67.85023`, 67.80077`, 68.59968`, 68.08671`, 67.87656`, > 68.47849`, 68.60006`, 68.07838`, 68.08199`, 67.73211`, 68.4132`, > 68.59541`, 68.28458`, 68.06489`, 68.41445`, 69.36998`, 69.00435`, > 69.37297`, 68.89496`, 69.37382`, 69.34415`, 68.96686`, 69.59887`, > 69.24597`, 69.68301`, 68.90541`, 69.07283`, 69.03297`, 69.18202`, > 69.64233`, 68.82818`, 69.24165`, 69.10265`, 68.98512`, 69.31551`, > 69.20435`, 68.93765`, 69.36661`, 68.71181`, 68.75662`, 69.35439`, > 69.74222`, 69.82326`, 69.90223`, 70.2992`, 69.83745`, 69.94847`, > 70.27479`, 70.67752`, 70.38903`, 70.37578`, 70.60668`, 70.16921`, > 69.85223`, 70.23353`, 70.28373`, 70.33881`, 69.81443`, 70.54739`, > 69.96746`, 69.73702`, 69.8604`, 70.87111`, 71.36657`, 71.1878`, > 70.75001`, 70.72998`, 71.32092`, 70.88794`, 70.9085`, 70.87662`, > 71.19803`, 71.31925`, 71.22916`, 71.35939`, 71.60205`, 70.97309`, > 71.1886`, 71.40319`, 71.39524`, 70.88752`, 71.27449`, 72.10289`, > 72.03197`, 71.9969`, 71.72577`, 71.92914`, 72.20518`, 72.29401`, > 72.5854`, 72.04673`, 71.80541`, 71.80464`, 73.06559`, 73.44548`, > 73.19223`, 73.37471`, 73.22554`, 72.88357`, 72.77826`, 73.26989`, > 73.96165`, 74.64342`, 73.92565`, 74.58767`, 74.31029`, 75.10003`, > 77.15504`, 60.78204`, 62.36303`, 66.40186`, 58.50708`, 70.00052`, > 70.99433`, 64.96417`, 70.47639`, 69.23383`, 64.90184`, 68.7749`, > 69.85805`, 62.52373`, 63.28805`, 63.52861`, 62.87456`, 63.91754`, > 64.32325`, 64.22405`, 64.59643`, 64.28548`, 63.78835`, 65.66404`, > 64.80838`, 65.63528`, 64.74897`, 64.79081`, 65.10988`, 65.55215`, > 65.30083`, 65.1426`, 65.09433`, 64.81397`, 65.95058`, 66.37511`, > 66.38624`, 66.31904`, 65.80919`, 66.09556`, 66.49077`, 66.32632`, > 66.59779`, 66.00909`, 66.45585`, 66.00818`, 66.46605`, 66.37783`, > 66.34685`, 66.31558`, 66.62303`, 66.79229`, 67.5336`, 67.15587`, > 66.78051`, 67.25544`, 66.79006`, 66.88298`, 68.1121`, 63.61572`, > 63.17978`, 65.67211`, 67.23403`, 67.4089`, 67.57913`, 67.20643`, > 67.10018`, 66.80557`, 67.09308`, 66.91372`, 66.77528`, 66.97572`, > 67.66639`, 67.62089`, 67.66841`, 67.32572`, 67.04153`, 66.96445`, > 67.07223`, 67.169`, 67.48077`, 67.67057`, 66.86465`, 67.04437`, > 67.72523`, 68.52969`, 67.8741`, 67.84693`, 68.26632`, 68.18364`, > 68.55723`, 67.77137`, 67.92976`, 67.72522`, 67.98916`, 68.0679`, > 67.772`, 68.11035`, 68.16623`, 68.61054`, 68.2893`, 68.38263`, > 68.6212`, 68.27802`, 67.93914`, 67.7105`, 68.351`, 68.14712`, > 67.97421`, 68.23682`, 68.05699`, 68.49856`, 68.58894`, 67.74098`, > 68.69765`, 68.63531`, 68.37844`, 69.11352`, 69.35385`, 69.5135`, > 69.11`, 69.64324`, 69.40655`, 69.18575`, 68.80709`, 69.11679`, > 69.02706`, 69.05703`, 69.14581`, 68.7308`, 68.9798`, 68.95303`, > 69.1639`, 68.81649`, 68.73746`, 69.00102`, 69.28222`, 69.37676`, > 68.90879`, 69.32318`, 69.63872`, 69.43581`, 68.97885`, 69.54252`, > 68.73497`, 69.20127`, 70.36167`, 70.10118`, 70.39507`, 70.03877`, > 69.76556`, 70.39131`, 70.0372`, 70.25908`, 69.87081`, 70.69845`, > 70.25756`, 69.7177`, 70.31993`, 69.95735`, 69.72691`, 70.22698`, > 70.02038`, 70.32035`, 70.39947`, 69.78074`, 69.7598`, 70.53827`, > 70.03449`, 70.59135`, 71.13378`, 71.15371`, 71.03018`, 70.93936`, > 70.78603`, 71.50695`, 71.57023`, 70.83563`, 70.96118`, 71.55428`, > 71.08274`, 71.49587`, 71.36997`, 71.49891`, 71.01177`, 71.62784`, > 71.36701`, 71.23426`, 70.90129`, 71.53087`, 72.441`, 72.5999`, > 71.79167`, 72.00806`, 72.01746`, 72.44981`, 71.92864`, 72.0908`, > 72.57398`, 72.53335`, 71.78483`, 72.57594`, 73.06795`, 73.18852`, > 73.39371`, 73.3754`, 73.67679`, 72.84789`, 72.99608`, 74.67822`, > 73.8507`, 74.35692`, 73.99906`, 73.92525`, 75.67784`, 76.10484`, > 78.2476`, 61.89619`, 69.86215`, 62.26801`, 71.40839`, 71.60925`, > 65.51351`, 71.86574`, 71.16645`, 64.53321`, 65.25053`, 69.62871`, > 65.10223`, 61.03526`, 63.12132`, 63.5968`, 63.47848`, 63.83162`, > 64.18388`, 64.66888`, 64.06363`, 64.38072`, 64.60295`, 64.81735`, > 65.22864`, 65.62354`, 65.62755`, 64.8584`, 65.6482`, 65.6904`, > 65.58218`, 65.08945`, 64.87234`, 65.68794`, 66.54461`, 66.23255`, > 65.91034`, 66.29882`, 66.33603`, 66.19024`, 66.12728`, 66.1938`, > 65.82389`, 66.61389`, 66.45299`, 66.25633`, 66.53703`, 66.28457`, > 65.90354`, 66.61969`, 66.59349`, 67.30641`, 67.41523`, 67.51658`, > 66.94071`, 67.11246`, 66.99107`, 66.94124`, 68.06898`, 67.47908`, > 63.00731`, 67.40208`, 68.75691`, 66.90827`, 67.28305`, 67.15978`, > 67.12405`, 67.07313`, 67.17665`, 66.74724`, 66.81865`, 67.43735`, > 67.37322`, 66.96049`, 67.40154`, 66.91834`, 66.93007`, 66.78425`, > 66.7842`, 67.15158`, 67.45025`, 67.68985`, 67.13767`, 67.60589`, > 67.96334`, 68.65674`, 68.42972`, 68.01111`, 68.61891`, 68.50647`, > 67.77439`, 68.09837`, 68.19228`, 68.54918`, 68.59413`, 68.65282`, > 68.40294`, 68.54259`, 68.59444`, 67.87885`, 68.0454`, 67.96346`, > 68.55092`, 68.07785`, 67.93252`, 68.5916`, 67.90891`, 68.63842`, > 68.6514`, 68.40634`, 68.19563`, 68.3391`, 68.13175`, 67.79551`, > 68.24471`, 67.96366`, 68.02669`, 68.07695`, 69.23339`, 69.22874`, > 68.9062`, 69.33247`, 69.53206`, 69.02418`, 69.26288`, 69.55433`, > 69.3664`, 68.96569`, 69.33038`, 69.10425`, 69.29199`, 69.26009`, > 68.71424`, 69.48488`, 69.48141`, 68.88311`, 68.83524`, 69.42378`, > 68.82387`, 69.06951`, 69.18528`, 69.26989`, 68.83727`, 69.11594`, > 69.39569`, 68.70258`, 70.39288`, 70.49606`, 70.11817`, 69.75304`, > 70.25238`, 70.28837`, 69.71807`, 70.13835`, 70.41752`, 69.91638`, > 69.7803`, 69.90789`, 70.29221`, 70.20136`, 70.42766`, 70.40239`, > 70.65713`, 69.7276`, 70.45174`, 70.52536`, 70.45682`, 70.52011`, > 70.25621`, 70.32714`, 71.39933`, 71.03487`, 71.61276`, 70.90129`, > 71.36831`, 71.46158`, 71.22939`, 71.59368`, 71.6476`, 71.33885`, > 71.13133`, 71.52388`, 70.95837`, 71.48199`, 70.85433`, 71.41922`, > 71.30872`, 71.22321`, 71.4506`, 70.76122`, 72.65576`, 71.96434`, > 72.3071`, 72.2446`, 72.38029`, 72.04211`, 71.77644`, 72.54877`, > 72.57381`, 71.90584`, 72.62022`, 72.4218`, 73.13823`, 73.60773`, > 73.2649`, 73.0769`, 73.69792`, 73.60551`, 72.87015`, 73.90142`, > 74.32431`, 73.87776`, 74.20972`, 74.47833`, 75.07304`, 76.3516`, > 78.36479`, 61.22021`, 72.63356`, 64.94291`, 73.02984`, 71.81569`, > 65.29123`, 60.90911`, 72.131`, 70.98853`, 61.7019`, 67.51436`, > 64.37789`, 63.2825`, 63.47892`, 63.66235`, 63.94637`, 63.93831`, > 63.94722`, 64.08187`, 64.68702`, 64.38337`, 63.91132`, 64.84282`, > 65.33216`, 65.2375`, 65.47348`, 65.16309`, 65.35727`, 65.59545`, > 64.70258`, 64.76966`, 65.55892`, 65.42338`, 66.54624`, 65.70133`, > 66.12315`, 66.2678`, 66.55539`, 66.42398`, 66.50633`, 66.27712`, > 66.42142`, 66.25827`, 66.1285`, 66.53558`, 66.32575`, 66.11991`, > 65.87925`, 65.70978`, 66.10198`, 67.57237`, 67.4361`, 67.00761`, > 67.21048`, 67.1921`, 67.39528`, 67.44979`, 68.18883`, 62.74094`, > 66.34954`, 65.69966`, 68.36264`, 67.52548`, 67.24632`, 67.21519`, > 67.45383`, 66.93472`, 67.6832`, 66.97218`, 66.73049`, 66.75153`, > 67.4346`, 66.92896`, 67.49282`, 66.93944`, 67.03135`, 66.91542`, > 66.97758`, 67.14932`, 67.53093`, 67.52202`, 67.27928`, 67.56893`, > 67.75773`, 68.10565`, 68.49664`, 68.5851`, 67.85579`, 68.60796`, > 68.19156`, 68.25828`, 68.15401`, 68.18623`, 68.16064`, 68.6097`, > 68.34391`, 68.65678`, 68.51914`, 67.72093`, 67.96986`, 67.75073`, > 68.09745`, 68.64602`, 68.2318`, 68.18244`, 68.15011`, 68.13611`, > 68.10048`, 68.53037`, 68.37728`, 68.17652`, 67.7452`, 67.93037`, > 68.25872`, 68.33639`, 68.27405`, 69.5816`, 68.70027`, 68.93075`, > 68.78663`, 69.0649`, 68.99285`, 68.99516`, 68.73929`, 69.47357`, > 69.08392`, 69.07281`, 69.62286`, 69.35683`, 69.16149`, 68.81413`, > 68.9529`, 69.47561`, 69.5506`, 69.38889`, 69.57241`, 69.37092`, > 68.92229`, 68.71081`, 69.2671`, 68.74473`, 68.81509`, 69.47472`, > 69.69307`, 69.65334`, 70.46902`, 70.00607`, 70.61711`, 70.51318`, > 69.97204`, 69.92313`, 70.46938`, 69.91923`, 69.71908`, 70.61155`, > 70.20868`, 70.27586`, 70.18348`, 70.5115`, 70.50015`, 70.24017`, > 70.001`, 70.21726`, 70.20554`, 69.97788`, 70.36632`, 70.38931`, > 70.18593`, 70.23168`, 70.74197`, 71.47899`, 71.41695`, 71.20207`, > 70.87987`, 71.26557`, 71.41653`, 71.24074`, 71.15528`, 71.20588`, > 70.98515`, 71.35642`, 71.21331`, 71.59639`, 71.25854`, 71.53325`, > 70.92787`, 71.54787`, 71.07293`, 70.86163`, 72.67319`, 71.77245`, > 72.64278`, 72.48159`, 71.9078`, 72.18324`, 72.55104`, 72.33861`, > 72.07098`, 72.30647`, 72.05185`, 72.75204`, 72.79178`, 73.50606`, > 73.68578`, 72.79593`, 73.41049`, 73.02077`, 73.20758`, 74.49237`, > 73.81263`, 73.81376`, 73.82642`, 73.81739`, 75.57544`, 77.23474`, > 60.05859`, 76.81927`, 66.72684`, 58.79456`, 67.89277`, 61.04946`, > 59.81693`, 70.75232`, 68.26774`, 69.30589`, 69.30199`, 67.015`}; > > In[60]:= lm = LinearModelFit[GaltonDat, {1, x}, x] > > Out[60]= FittedModel[\\!\\(\\* > PanelBox[ > TagBox[ > RowBox[{\33.88660435407788`\, \ \, \+\, > RowBox[{\0.5140930386233082`\, \ \, \x\}]}], > Short], > FrameMargins->5]\\)] > > In[62]:= lm[\BestFit\] > > Out[62]= 33.8866 + 0.514093 x > > In[63]:= r2 = Correlation[GaltonX, GaltonY] > > Out[63]= 0.501338 === Subject: Re: Difference Fit vs. Correlation Gentlemen, I must have been in a hurry when I was writing the original code. My problem was that I had calculated the slope of the regression line by multiplying Correlation[GaltonX,GaltonY] with StandardDeviation[GaltonX]/StandardDeviation[GaltonY] However, the correct slope of the regression line is Correlation[GaltonX,GaltonY] * StandardDeviation[GaltonY]/StandardDeviation[GaltonX] Below is some code that should clarify things (use GaltonX and GaltonY from original post). Claus In[98]:= lm = LinearModelFit[Transpose@{GaltonX, GaltonY}, {1, x}, x] lm[\BestFit\] Out[98]= FittedModel[\\!\\(\\* PanelBox[ TagBox[ RowBox[{\33.88660435407788`\, \ \, \+\, RowBox[{\0.5140930386233082`\, \ \, \x\}]}], Short], FrameMargins->5]\\)] Out[99]= 33.8866 + 0.514093 x should be the same if I use the original pairs In[100]:= lm2 = LinearModelFit[GaltonDat, {1, x}, x] lm2[\BestFit\] Out[100]= FittedModel[\\!\\(\\* PanelBox[ TagBox[ RowBox[{\33.88660435407788`\, \ \, \+\, RowBox[{\0.5140930386233082`\, \ \, \x\}]}], Short], FrameMargins->5]\\)] Out[101]= 33.8866 + 0.514093 x In[102]:= CorrelXY = Correlation[GaltonX, GaltonY] Out[102]= 0.501338 In[103]:= SDevX = StandardDeviation[GaltonX] SDevY = StandardDeviation[GaltonY] MY = Mean[GaltonY] MX = Mean[GaltonX] CovXY = Covariance[GaltonX, GaltonY] Out[103]= 2.74487 Out[104]= 2.8147 Out[105]= 68.6841 Out[106]= 67.6871 Out[107]= 3.87333 CorrelXY2 should be the same as CorrelXY In[108]:= CorrelXY2 = CovXY/(SDevX*SDevY) Out[108]= 0.501338 Slope of the regression line In[109]:= slopeRegrL = CorrelXY*SDevY/SDevX Out[109]= 0.514093 In[110]:= interceptRegrL = MY - slopeRegrL*MX Out[110]= 33.8866 In[111]:= regrLine = interceptRegrL + slopeRegrL*x Out[111]= 33.8866 + 0.514093 x Now this is the same as the result from LinearModelFit In[112]:= lm[\BestFit\] Out[112]= 33.8866 + 0.514093 x === Subject: Re: Need some help with monitoring evaluation This has caused me some consternation in the past. By this I mean that I make some coding error that causes Mathematica to loop. I would check out: ref/TimeConstrained ref/Reap ref/StepMonitor HTH. Roger Williams Franklin Laboratory > > I'm trying to convolve a Rayleigh distribution with a circular > distribution along the x dimension. It simplifies into a Gaussian > convolved with an expression of the form 1/(pi*Sqrt[q^2-x^2]). > === Subject: Re: DiscretePlot Additionally, you could use ListPlot @ Table[ s[k], {k,1,150} ] or ListPlot @ Array[s,150]. Also, ListPlot @ Accumulate @ Array[a, 150] if speed is ever an issue. === Subject: Re: DiscretePlot > ... >> However, unlike ListPlot (which has Joined->False by default), >> DiscretePlot has Joined->Automatic by default. If we plot greater than >> 149 points with DiscretePlot, Mathematica joins the points, and it's a >> royal mess. > >> The students are having trouble remembering to do this, though, and I >> ... >> I'd be far happier if DiscretePlot had Joined->False by default. > > Mathematica allows you to set the option defaults to meet your needs. > Just SetOptions once per session and be done with it: I know all about SetOptions. That wasn't my point. The point is, I think it was a poor design choice by Wolfram to have DiscretePlot behave in this way. My students are not going to go around doing SetOptions every time they need to use DiscretePlot, and they shouldn't have to. -- Helen Read University of Vermont === Subject: Galois resolvent Forthe quartic (*) x^4 + Bx^2 + Cx + D = 0 for integers B, C and D, assume \ that as for the case C = 0 that all its roots are classically contructible \ also for the case C /= 0. We can then show that the equation (*) is cyclic (i.e. its Galois group = \ Z4) iff the splitting field of its Descartes resolvent is E = Q[Sqrt[t0] /= Q \ for t0 the one and only integer roots t0 of the resolvent. For details, see \ http://mathforum.org/kb/thread.jspa?threadID=1903146. If the quartic (*) is cyclic, it should be possible using the above to \ explicitly construct the so-called Galois resolvents of (*): The roots x1, \ x2, x3 and x4 of the quartic (*) can be given by polynomials of r with degree \ less or equal to 3 with rational coefficients for r an arbitrarily root of \ the quartic. (I.e. the splitting field of the quartic (*) when cyclic is Q[r] \ for r a root.) Can somebody, using Mathematica, explicitly determine these polynomial \ representations of the roots of the quartic (*). The case C = 0 is easy. But \ the case C /= 0 is indeed messy. Kent Holing, NORWAY === Subject: Re: Creating TOC with Mathematica 7 > Hello all, > > I'm writing a larger document with Mathematica 7 (stylesheet book) an= d have > the problem of creating a table of contents. I tried the Author tools, > WRI support told me this should work with version 7... but I only get > error messages.Can anyone give me an hint how to produce a TOC (and an > index)? > > > Mike Addendum: I made the observation that TOC generation works well, when there is no autonumbering in the document (noch section etc. numbers), the errors occur when there are numbered sections etc. WRI Support told me also that this (sumbered sections etc.) could be the problem, but there is no solution (from WRI).... Mike === Subject: Re: Inverse of a Big Matrix >I'm computing the inverse of a big matrix, 500 x 500. Well, maybe >not that big, but I'm getting the error message >\General::luc: Result for `1` of badly conditioned matrix `2` may >contain significant numerical errors. >>\ >and I'm wondering if anyone can suggest a workaround. All I can say >is that the determinant is very small (-4.327475016428501*10^-1947), If the determinant is that small, why do you think it isn't truly 0? Recall, a matrix with a determinant of 0 is singular and has no inverse. In fact, such a small determinant is the reason you are getting a warning about a badly conditioned matrix. If the matrix is singular there is no workaround. But why are you computing the inverse? Computing the inverse of a general matrix is computationally expensive (a n^3 problem). There are a variety of algorithms for solving matrix problems that avoid explicitly computing a matrix inverse and are much more efficient. Many of these are built in to Mathematica already. >and that I can compute the inverse of various submatrices of size >100 x100. Being able to compute the inverse of submatrices of some given matrix says nothing about whether the given matrix is singular or not. === Subject: Re: HoldForm[1*2*3] should give 1 x 2 x 3 not 2 x 3 > HoldForm[] is loosing the 1* when it apparently should not: > > In[1]:= HoldForm[1*2*3] > Out[1]= 2 x 3 > Another interesting case, is if you replace the above with In[16]:= HoldForm[1*2*1] Out[16]= 1 2 1 So, adding a '1' at the end, brings back the '1' at the front? Mathematica 7.0 on Windows XP SP2 --Nasser === Subject: Re: HoldForm[1*2*3] should give 1 x 2 x 3 not 2 x 3 I think the answer is probably hinted at in the help to HoldComplete (which holds more than HoldForm, but still displays the behaviour you have mentioned). \HoldComplete affects only evaluation; input transformations are still applied:\ Times[1,2,3] -> Times[2,3] is likely an \input transformation\ rather than an evaluation === Subject: Re: HoldForm[1*2*3] should give 1 x 2 x 3 not 2 x 3 Indeed, the same happens with Hold and HoldComplete. I'd say this is a bug. > HoldForm[] is loosing the 1* when it apparently should not: > > In[1]:= HoldForm[1*2*3] > Out[1]= 2 x 3 > > In[2]:= HoldForm[1*1*1] > Out[2]= 1 x 1 x 1 > > In[3]:= HoldForm[3*2*1] > Out[3]= 3 x 2 > > In[4]:= HoldForm[2*2*2] > Out[4]= 2 x 2 x 2 > > In[5]:= HoldForm[2*1*3] > Out[5]= 2 x 3 > > In[6]:= HoldForm[1*2] > Out[6]= 1 x 2 > > In[7]:= HoldForm[1*2*1] > Out[7]= 1 x 2 x 1 > > Q.E.D. === Subject: Re: Interval arithmetic and Dependency problems >Mathematica symbolizes a disjoint interval as Interval[], and this >might result from, say >IntervalIntersection[Interval[{0,1}], Interval[{2,4}]]. >While I would like to think of this as a \null\ interval, one >without any range (in particular Interval[{0,0}]), But Interval[{0,0}] is not a \null\ interval. Instead it is an interval containing a single point on the real line. If Interval[{0,0}] was defined to be a \null\ interval, how would you deal with IntervalIntersection[ Interval[{-1,0}], Interval[{0,1}] ] >Mathematica >instead treats this object as the same thing as Interval[{Infinity, >-Infinity}], i.e. completely off the real line (not explained in the >documentation). Therefore, >Interval[{0,1}] + Interval[] == Interval[] (rather than >Interval[{0,1}]) Hmm... It looks like you are expecting Interval[{0,1}] + Interval[] to represent the union of two intervals. If so, why aren't you using the function IntervalUnion, i.e., In[12]:= IntervalUnion[Interval[{0, 1}], Interval[]] Out[12]= Interval[{0,1}] And if you aren't using Interval[{0,1}] + Interval[] to be the union of the two intervals, what are you defining the sum of two intervals to be? >More importantly, I want to test if two intervals overlap or not. If >they don't, >IntervalIntersection[Interval[{0,1}], Interval[{2,4}]] == Interval[] >returns True, which is fine, but if they *do* overlap, >IntervalIntersection[Interval[{0,3}], Interval[{2,4}]] == Interval[] >does *not* return False but rather leaves it undetermined. Instead of Equal use SameQ, i.e., In[14]:= IntervalIntersection[Interval[{0, 3}], Interval[{2, Interval[] Out[14]= False === Subject: Re: Transparent background with PNG No idea? === Subject: lock image size in a cell often evaluating functions that output images as a result, I re- evaluate an input cell many times, fine tuning its parameters. Since the images I process are large, I manually resize the image output to visually inspect it. Re-evaluating the input, the output doesnt remember my manually-set size. There is a way to lock this cell size - just for display (I dont want to effectively resize the image) ? alessandro magni === Subject: how to specify sheet names in xls export? is there a way to specify the sheet names when exporting excel xls spreadsheets? i couldn't find much details in the documentation. my best attempt so far is: Export[\test_sheet_name.xls\, Table[100 i + 10 j + k, {i, 2}, {j, \ 3}, {k, 4}], \Sheets\ -> {\a\, \b\}] but that doesn't work... any help/suggestions please? Mitch === Subject: Re: Graphics export for high quality documents In the past, I have been using exports to EPS with an embedded preview so that you have something to look at in Word. On screen it may or may not look fantastic, depending on the selected preview details, but it prints fine (at least on a postscript printer). Mathematica embeds fonts by default in EPS (at least, the documentation has this claim). > Graphics export for high quality documents > > I am working on a book project where I have a number of graphics, and > some tables that I want to create using Mathematica. There are a numbe= r > of problems that I have found with this. I am using Mathematica 7.0 o= n > Windows 64 bit, in case that matters. > > It is hard to get high quality output into Microsoft Word. If I expor= t > graphics as WMF or EMF the text frequently look funny - there is a > character layout issue. I think this has to do with how Mathematica > deals with spacing and scaling. Setting ImageSize helps, and using the > right font names helps, but there still are problems. > > Another problem is that PDF files of a Word document that includes > Mathematica graphics imported as EMF often has problems with > mathematical symbols. > > Exporting PDF directly from Mathematica is in general higher quality > than WMF, EMF output. However, it has the problem that you can't impor= t > it into Microsoft Word - at least not directly. There might some way t= o > process it so you can. > > Also, there seem to be some persistent problems with PDFs- the > mathematical symbol fonts do not seem to work reliably for me. Part o= f > the problem is a bug/feature in Mathematica that it does not embed fonts > in the PDF. The work around is to run a PDF distiller program over th= e > output to embed the fonts which helps. > > PDFs from Mathematica can be edited with Adobe Illustrator, which helps > touch them up if there is something I can't achieve in Mathematica > directly. Again, there are problems with math fonts - even on the sam= e > computer if I edit a graph that has Traditional Form output, the math > symbols won't appear in Illustrator. > > For use in the book we want to import the pictures into Adobe InDesign. > I am not an InDesign user, but when I have tried to import PDFs from > Mathematica using the Place command, what I get looks like a scaled, low > res bitmap. The book publishing / design / layout people that I have > spoken with so far all want me to export raw data so the graphs can be > made with other software - they have no experience with Mathematica. > Yet many people seem to do books with Mathematica so this must be a > solved problem. > > Tables are another issue - with the Grid[] you can make some pretty > complicated tables. But they are hard to export to other programs tha= t > will treat them like tables instead of like pictures. EMF and PDF > work, but with the same problems as Graphics output. It has occurred t= o > me that HTML or XML output might help for tables. > > Finally, I know that a lot of people use 3rd party add-ons when they > make publication quality graphs with Mathematica. The Presentations > package by David Park is one such - which I already have, but I have > only used for a few things and don't claim to know all it can do. > There are/were several packages on MathSource for doing custom tick > marks and other things - they probably are still there but they have > reorganized MathSource to a state where I can't find them anymore, even > with search. Are there any other add-ons that are useful for publication > quality graphics? Or stand alone programs I can use to post-proces= s > things exported from Mathematica? > > Surely somebody out there must have experience with this! > > Here are my specific questions: > > 1. What is the best strategy for Export[] for graphics for use= in > Microsoft Word? Export to EMF? Something else? > > 2. What is the best strategy for Export[] to import into InDes= ign > or other desktop publishing programs? Export to PDF, followed by > running though batch PDF distiller is my best hope at the moment. > > 3. What are the most useful Mathematica add-ons, or stand alon= e > programs for making publication quality charts and graphics? > > Nathan > > This message and any attachments, may contain confidential and/or > legally privileged information. If you are not the intended recipient > of the message by the original sender, please destroy it. Message and > attachments copyright (c) 2008, all rights reserved. Any unauthorized > dissemination, distribution or copying is strictly forbidden === Subject: Re: Graphics export for high quality documents > It is hard to get high quality output into Microsoft Word. If I > export > graphics as WMF or EMF the text frequently look funny - there is a > character layout issue. I think this has to do with how Mathematica > deals with spacing and scaling. Setting ImageSize helps, and using > the > right font names helps, but there still are problems. If at all possible avoid Windows Metafile Format; it's old and breaks easily. Bu there are also seem to be multiple versions of EMF floating around, and I've noticed some issues popping up again with Office 2007. In any case, you might try running EMF files through Adobe Illustrator and saving them as a new file (EMF or PDF) before releasing them on Microsoft products. I've had success with this in the past. > Graphics export for high quality documents > > For use in the book we want to import the pictures into Adobe > InDesign. > I am not an InDesign user, but when I have tried to import PDFs from > Mathematica using the Place command, what I get looks like a scaled, > low > res bitmap. The book publishing / design / layout people that I have > spoken with so far all want me to export raw data so the graphs can be > made with other software - they have no experience with Mathematica. > Yet many people seem to do books with Mathematica so this must be a > solved problem. It's possible that the low-quality image you see is simply to speed up its display in InDesign; try menuing View > Display Performance and choosing a higher setting. -- Andy === Subject: Re: Counting Categories I don't see an easy way to use GatherBy for this... but there may be one. Bobby > called GatherBy. Not sure if it does the same thing. > > > Gregory > > > >> Something like: >> >> colors = {red, yellow, green, blue}; >> sizes = {small, medium, large}; >> randomColor := RandomChoice@colors >> randomSize := RandomChoice@sizes >> pairs = Table[{randomColor, randomSize}, {50}]; >> >> Partition[Count[pairs, #] & /@ Tuples[{colors, sizes}], Length@sizes] >> >> {{5, 3, 3}, {3, 6, 3}, {8, 1, 2}, {5, 4, 7}} >> >> or >> >> Apply[Count[pairs, {##}, 1] &, Outer[List, colors, sizes], {2}] >> >> {{5, 3, 3}, {3, 6, 3}, {8, 1, 2}, {5, 4, 7}} >> >> Bobby >> >> >>> Hello Everyone, >>> >>> I'm trying to do multivariate category counts in the way that used to >>> be handled by CategoryCounts but is now replaced by Cases. The >>> example in Help simply applies Cases twice to find the count of >>> elements in a list that are numbers and the count that is even. >>> >>> Map[Cases[{a, b, c, 1, 2, d, 3}, #] &, {_?NumberQ, _?EvenQ}] >>> >>> {{1, 2, 3}, {2}} >>> >>> But what if I have many rows of observations on two dimensions >>> (columns) such as red, blue, green, and small, medium, big? I'd like >>> to be able categorize them accordingly as the count of small and red, >>> medium and red, big and red, and so on. Any way to do that? >>> >>> >>> Gregory >>> >>> >>> >>> >> >> >> >> --DrMajorBob@longhorns.com > -- DrMajorBob@longhorns.com === Subject: Re: Counting Categories If the lists are large, I suspect Tally will be fastest. In that case, you \ can get the contingency table this way: colors = {red, yellow, green, blue}; sizes = {small, medium, large}; randomColor := RandomChoice@colors randomSize := RandomChoice@sizes pairs = Table[{randomColor, randomSize}, {50}]; Clear[count] count[_] = 0; Replace[Tally[pairs], {x_List, c_Integer} :> (count[x] = c), 1]; Table[count@{color, size}, {color, colors}, {size, sizes}] {{5, 6, 5}, {3, 4, 5}, {5, 4, 6}, {4, 3, 0}} The \count\ function acts much like a sparse array here, without SparseArray's many limitations. Bobby > colors = {red, yellow, green, blue}; > sizes = {small, medium, large}; > randomColor := RandomChoice@colors > randomSize := RandomChoice@sizes > pairs = Table[{randomColor, randomSize}, {50}]; > Partition[Count[pairs, #] & /@ Tuples[{colors, sizes}], Length@sizes] > {{5, 3, 3}, {3, 6, 3}, {8, 1, 2}, {5, 4, 7}} > or > Apply[Count[pairs, {##}, 1] &, Outer[List, colors, sizes], {2}] -- DrMajorBob@longhorns.com === Subject: Re: Counting Categories Gather does it without the counts. Tally does it and includes the counts. But yours is best because neither Gather nor Tally gives the results in the order of the original tuples, so there'd be the overhead of (somehow) sorting, and rearranging to get a nice contingency table. Gregory > I don't see an easy way to use GatherBy for this... but there may be > one. > > Bobby > > >> called GatherBy. Not sure if it does the same thing. >> >> >> Gregory >> >> >> >>> Something like: >>> >>> colors = {red, yellow, green, blue}; >>> sizes = {small, medium, large}; >>> randomColor := RandomChoice@colors >>> randomSize := RandomChoice@sizes >>> pairs = Table[{randomColor, randomSize}, {50}]; >>> >>> Partition[Count[pairs, #] & /@ Tuples[{colors, sizes}], >>> Length@sizes] >>> >>> {{5, 3, 3}, {3, 6, 3}, {8, 1, 2}, {5, 4, 7}} >>> >>> or >>> >>> Apply[Count[pairs, {##}, 1] &, Outer[List, colors, sizes], {2}] >>> >>> {{5, 3, 3}, {3, 6, 3}, {8, 1, 2}, {5, 4, 7}} >>> >>> Bobby >>> >>> >>>> Hello Everyone, >>>> >>>> I'm trying to do multivariate category counts in the way that >>>> used to >>>> be handled by CategoryCounts but is now replaced by Cases. The >>>> example in Help simply applies Cases twice to find the count of >>>> elements in a list that are numbers and the count that is even. >>>> >>>> Map[Cases[{a, b, c, 1, 2, d, 3}, #] &, {_?NumberQ, _?EvenQ}] >>>> >>>> {{1, 2, 3}, {2}} >>>> >>>> But what if I have many rows of observations on two dimensions >>>> (columns) such as red, blue, green, and small, medium, big? I'd >>>> like >>>> to be able categorize them accordingly as the count of small and >>>> red, >>>> medium and red, big and red, and so on. Any way to do that? >>>> >>>> >>>> Gregory >>>> >>>> >>>> >>>> >>> >>> >>> >>> --DrMajorBob@longhorns.com >> > > > > -- > DrMajorBob@longhorns.com === Subject: Re: Counting Categories > Hello Everyone, > > I'm trying to do multivariate category counts in the way that used to > be handled by CategoryCounts but is now replaced by Cases. The > example in Help simply applies Cases twice to find the count of > elements in a list that are numbers and the count that is even. > > Map[Cases[{a, b, c, 1, 2, d, 3}, #] &, {_?NumberQ, _?EvenQ}] > > {{1, 2, 3}, {2}} > > But what if I have many rows of observations on two dimensions > (columns) such as red, blue, green, and small, medium, big? I'd like > to be able categorize them accordingly as the count of small and red, > medium and red, big and red, and so on. Any way to do that? > > > Gregory > > > > You mentioned Cases, but I think you meant Count. Tally will do the counting you described. In[1]:= data = Transpose[{RandomChoice[{red, blue, green}, 20], RandomChoice[{small, medium, big}, 20]}]; In[2]:= Tally[data] Out[2]= {{{blue, medium}, 6}, {{green, medium}, 2}, {{red, medium}, 2}, {{green, small}, 5}, > {{blue, small}, 1}, {{red, small}, 2}, {{red, big}, 2}} Darren Glosemeyer Wolfram Research === Subject: Re: Counting Categories Something like: colors = {red, yellow, green, blue}; sizes = {small, medium, large}; randomColor := RandomChoice@colors randomSize := RandomChoice@sizes pairs = Table[{randomColor, randomSize}, {50}]; Partition[Count[pairs, #] & /@ Tuples[{colors, sizes}], Length@sizes] {{5, 3, 3}, {3, 6, 3}, {8, 1, 2}, {5, 4, 7}} or Apply[Count[pairs, {##}, 1] &, Outer[List, colors, sizes], {2}] {{5, 3, 3}, {3, 6, 3}, {8, 1, 2}, {5, 4, 7}} Bobby > Hello Everyone, > > I'm trying to do multivariate category counts in the way that used to > be handled by CategoryCounts but is now replaced by Cases. The > example in Help simply applies Cases twice to find the count of > elements in a list that are numbers and the count that is even. > > Map[Cases[{a, b, c, 1, 2, d, 3}, #] &, {_?NumberQ, _?EvenQ}] > > {{1, 2, 3}, {2}} > > But what if I have many rows of observations on two dimensions > (columns) such as red, blue, green, and small, medium, big? I'd like > to be able categorize them accordingly as the count of small and red, > medium and red, big and red, and so on. Any way to do that? > > > Gregory > > > > -- DrMajorBob@longhorns.com === Subject: Re: Counting Categories > sort either the original data or the output so that it has the same > ordering as the choices {red, blue, green}, {small, medium, big}. > > > Gregory > > >> You mentioned Cases, but I think you meant Count. Tally will do the >> counting you described. >> >> In[1]:= data = Transpose[{RandomChoice[{red, blue, green}, 20], >> RandomChoice[{small, medium, big}, 20]}]; >> >> In[2]:= Tally[data] >> >> Out[2]= {{{blue, medium}, 6}, {{green, medium}, 2}, {{red, medium}, >> 2}, {{green, small}, 5}, >> > {{blue, small}, 1}, {{red, small}, 2}, {{red, big}, 2}} >> >> >> Darren Glosemeyer >> Wolfram Research One possibility is to replace the colors and sizes by indexes, tally the indexed data, sort the tallied results, and then replace the indexes by the original values. In[1]:= data = Transpose[{RandomChoice[{red, blue, green}, 20], RandomChoice[{small, medium, big}, 20]}]; (* store values in a new variable and replace first elements by color indexes and second elements by size indexes *) In[2]:= orderdata = data; In[3]:= orderdata[[All, 1]] = orderdata[[All, 1]] /. Thread[Rule[{red, blue, green}, {1, 2, 3}]]; In[4]:= orderdata[[All, 2]] = orderdata[[All, 2]] /. Thread[Rule[{small, medium, big}, {1, 2, 3}]]; (*Tally and Sort to get the tallies in the desired order*) In[5]:= tallies = Sort[Tally[orderdata]]; (* undo the indexing *) In[6]:= tallies[[All, 1, 1]] = tallies[[All, 1, 1]] /. Thread[Rule[{1, 2, 3}, {red, blue, green}]]; In[7]:= tallies[[All, 1, 2]] = tallies[[All, 1, 2]] /. Thread[Rule[{1, 2, 3}, {small, medium, big}]]; In[8]:= tallies Out[8]= {{{red, small}, 2}, {{red, medium}, 2}, {{red, big}, 2}, {{blue, small}, 2}, {{blue, big}, 1}, > {{green, small}, 4}, {{green, medium}, 3}, {{green, big}, 4}} (* compare with Tally[]ing the original data to see that counts agree, though the order is different *) In[9]:= Tally[data] Out[9]= {{{green, big}, 4}, {{green, medium}, 3}, {{red, medium}, 2}, {{red, big}, 2}, > {{blue, small}, 2}, {{blue, big}, 1}, {{green, small}, 4}, {{red, small}, 2}} Darren Glosemeyer Wolfram Research === Subject: Re: Counting Categories sort either the original data or the output so that it has the same ordering as the choices {red, blue, green}, {small, medium, big}. Gregory > You mentioned Cases, but I think you meant Count. Tally will do the > counting you described. > > In[1]:= data = Transpose[{RandomChoice[{red, blue, green}, 20], > RandomChoice[{small, medium, big}, 20]}]; > > In[2]:= Tally[data] > > Out[2]= {{{blue, medium}, 6}, {{green, medium}, 2}, {{red, medium}, > 2}, {{green, small}, 5}, > > {{blue, small}, 1}, {{red, small}, 2}, {{red, big}, 2}} > > > Darren Glosemeyer > Wolfram Research === Subject: Re: Counting Categories called GatherBy. Not sure if it does the same thing. Gregory > Something like: > > colors = {red, yellow, green, blue}; > sizes = {small, medium, large}; > randomColor := RandomChoice@colors > randomSize := RandomChoice@sizes > pairs = Table[{randomColor, randomSize}, {50}]; > > Partition[Count[pairs, #] & /@ Tuples[{colors, sizes}], Length@sizes] > > {{5, 3, 3}, {3, 6, 3}, {8, 1, 2}, {5, 4, 7}} > > or > > Apply[Count[pairs, {##}, 1] &, Outer[List, colors, sizes], {2}] > > {{5, 3, 3}, {3, 6, 3}, {8, 1, 2}, {5, 4, 7}} > > Bobby > > >> Hello Everyone, >> >> I'm trying to do multivariate category counts in the way that used to >> be handled by CategoryCounts but is now replaced by Cases. The >> example in Help simply applies Cases twice to find the count of >> elements in a list that are numbers and the count that is even. >> >> Map[Cases[{a, b, c, 1, 2, d, 3}, #] &, {_?NumberQ, _?EvenQ}] >> >> {{1, 2, 3}, {2}} >> >> But what if I have many rows of observations on two dimensions >> (columns) such as red, blue, green, and small, medium, big? I'd like >> to be able categorize them accordingly as the count of small and red, >> medium and red, big and red, and so on. Any way to do that? >> >> >> Gregory >> >> >> >> > > > > -- > DrMajorBob@longhorns.com === Subject: Re: Counting Categories Hi Gregory, To avoid confusion: CategoryCount is not replaced with the Cases constructiom you showed. That's the function CategoryLists. CategoryCount is done with Count instead of Cases. However, what you want can be easily done with Tally: In[187]:= data = Table[{RandomChoice[{red, green, blue}], RandomChoice[{small, big, medium}]}, {20}] Out[187]= {{green, big}, {red, medium}, {red, big}, {red, big}, {blue, medium}, {blue, big}, {blue, small}, {green, big}, {red, medium}, {red, medium}, {blue, big}, {red, medium}, {green, big}, {green, small}, {red, medium}, {blue, small}, {green, big}, {red, medium}, {red, medium}, {red, medium}} In[188]:= Tally[data] Out[188]= {{{green, big}, 4}, {{red, medium}, 8}, {{red, big}, 2}, {{blue, medium}, 1}, {{blue, big}, 2}, {{blue, small}, 2}, {{green, small}, 1}} > Hello Everyone, > > I'm trying to do multivariate category counts in the way that used to > be handled by CategoryCounts but is now replaced by Cases. The > example in Help simply applies Cases twice to find the count of > elements in a list that are numbers and the count that is even. > > Map[Cases[{a, b, c, 1, 2, d, 3}, #] &, {_?NumberQ, _?EvenQ}] > > {{1, 2, 3}, {2}} > > But what if I have many rows of observations on two dimensions > (columns) such as red, blue, green, and small, medium, big? I'd like = > to be able categorize them accordingly as the count of small and red, > medium and red, big and red, and so on. Any way to do that? > > > Gregory === Subject: Re: Counting Categories You need to be more specific about your data structure, ie. post an example. It sounds to me like you have a list of observations? Where each observation is a {color, size} pair? vColor = {red, blue, green}; vSize = {small, medium, large}; mObs = Transpose[RandomChoice[#, 100] & /@ {vColor, vSize}]; In[118]:= mObs // Tally Out[118]= {{{blue, large}, 14}, {{green, small}, 15}, {{blue, medium}, 13}, {{red, medium}, 7}, {{blue, small}, 9}, {{red, large}, 12}, {{green, large}, 11}, {{green, medium}, 9}, {{red, small}, 10}} === Subject: newbie: diff equation I want to solve f''[x]= - m^2 f[x] with f[0] = 0 and f[Pi] = 0 this is obviously only solvable with the condition on m being integer but if \ I do DSolve on the above with the boundary conditions I just get f=0. How can \ I get mathematica to solve this and give me the conditions on m? I need to \ solve much more general problems of this type. I hope someone can help.