The Museum of HP Calculators

HP Forum Archive 17

[ Return to Index | Top of Index ]

Curve Fitting for the HP 35s
Message #1 Posted by Stefan Vorkoetter on 17 Oct 2007, 9:28 p.m.

I've just published a program, Curve Fitting for the HP 35s, on my web site. This program is like the similar program in the HP-41C Advantage Pac and the one built into the HP-42s, in that it lets you enter data pairs first, and then chose the type of curve you want to fit to it (linear, logarithmic, exponential, and power). You can try different curves on the same data, or you can have the program chose the one with the best fit.

I wrote this primarily as an exercise in getting to know the HP 35s programming environment, and how to get around its limitations (limited user interface possibilities compared to the 41C or 42s).

Enjoy!

Stefan

      
Is this the "blank screen" program you can't R/S out of?
Message #2 Posted by Gene Wright on 17 Oct 2007, 9:38 p.m.,
in response to message #1 by Stefan Vorkoetter

?

            
Re: Is this the "blank screen" program you can't R/S out of?
Message #3 Posted by Stefan Vorkoetter on 17 Oct 2007, 10:43 p.m.,
in response to message #2 by Gene Wright

Yes, it is, but of course it doesn't crash, because it is only in this blank screen mode for a few seconds before getting to a SF 10 / EQN / CF 10 sequence where it stops and displays something.

Just to clarify, this isn't John's crashing program. This is my own unrelated program where I happened to observe that there are some segments during which "RUNNING" doesn't appear, and R/S won't stop it.

Stefan

      
I think you may like this...
Message #4 Posted by Vieira, Luiz C. (Brazil) on 18 Oct 2007, 5:43 a.m.,
in response to message #1 by Stefan Vorkoetter

Hi, Stefan;

sometime ago I designed a set of display templates and some fonts (HPCC V3N4) with CorelDRAW!®. The main idea was to help the development of custom documentation with specific characters. Last year I created a particular TTF for the HP50G keyboard (HP48GII, HP49G+ as well) available here. A few days ago I scanned the HP35S display and took some time to draw its contents, and got to this:

Click to enlarge

This is just a JPEG image, the original CDR is not (yet) available. As you can see, it also fits the HP33S display. I saw that you used two pictures of the HP35S display, and they both could be drawn with a different resolution. The display patterns have all necessary annunciators and the corresponding TTF structure so one can draw whatever can be shown in the LCD.

Also, a 'under development' HP35S character set TTF is available, with the earlier HP33S name (to be updated). This one has the 'i' symbol for the complex representation (seen in the picture) and a slightly bigger dot (and comma) characters. It also has the missing ':', not available in the first HP33S TTF. Some new characters will be added later, like the small 7, 8 and 9 for the menu options (the HP33S had a maximum of 6 options per menu) and any others that are new.

I'll let the .CDR file with the HP33S/35S LCD template available later.

Any suggestions?

Cheers.

Luiz (Brazil)

Edited: 18 Oct 2007, 5:56 a.m.

            
Re: I think you may like this...
Message #5 Posted by Stefan Vorkoetter on 18 Oct 2007, 9:51 a.m.,
in response to message #4 by Vieira, Luiz C. (Brazil)

Very nice! But unfortunately I don't have Corel Draw. I guess for now, with the limited number of screen images I need, I'll just use the scanner.

Stefan

            
Re: I think you may like this...
Message #6 Posted by Bruce Bergman on 18 Oct 2007, 1:38 p.m.,
in response to message #4 by Vieira, Luiz C. (Brazil)

There is already an HP-35s TTF package available, if you are interested in saving yourself some work. Fonts for both screens and printed keystrokes.

thanks, bruce

                  
Re: I think you may like this...
Message #7 Posted by Vieira, Luiz C. (Brazil) on 18 Oct 2007, 1:56 p.m.,
in response to message #6 by Bruce Bergman

Hi, Bruce;

thank you for this information. Just for being sure: are you talking about the ones also available thru Valentin´s page? Those ones I have already downloaded. If not, would you point me the e-address they are available?

The ones Valentin shared I guess are the same used in the original HP manuals, is that correct? They are somehow different of the ones available with the TTF I draw for the HP33S (have you already seen it?), I tried to get them closer to the calculator actual look. In order to create the HP35S set, I'd actually add the missing characters to the exisitng HP33S TTF, they are just a little bunch. It would be an extra option, though.

Best regards.

Luiz (Brazil)

                        
Re: I think you may like this...
Message #8 Posted by Bruce Bergman on 18 Oct 2007, 2:49 p.m.,
in response to message #7 by Vieira, Luiz C. (Brazil)

Yeah, the ones I was thinking of are the same ones that Valentin put up. So I guess you're good then, either way. ;-)

thanks, bruce

      
Re: Curve Fitting for the HP 35s
Message #9 Posted by John Wasilewski on 19 Oct 2007, 7:43 p.m.,
in response to message #1 by Stefan Vorkoetter

Interesting and very useful program Stefan, thank you. It is very likely that I will use it from time to time. Is there any chance that you might do one for polynomial curve fitting? ---
John

            
Re: Curve Fitting for the HP 35s
Message #10 Posted by Stefan Vorkoetter on 20 Oct 2007, 11:11 a.m.,
in response to message #9 by John Wasilewski

Do you mean an exact fit of a degree-N polynomial to N+1 points, or a least squares fit of a larger polynomial?

But in either case, probably not. The only reason I did the curve fitting program is because it's something I tend to use regularly, and it's a non-trivial program and thus an interesting way to get familiar with the 35s and its quirks.

I do plan to post a few other 35s programs, and perhaps an article of 35s programming techniques.

Stefan

                  
Re: Curve Fitting for the HP 35s
Message #11 Posted by John Wasilewski on 20 Oct 2007, 2:22 p.m.,
in response to message #10 by Stefan Vorkoetter

Do you know, I didn't know it was possible to fit a polynomial to a set of points exactly!

What I meant was using polynomial regression to find an expression of user-selected order that gives an OK fit to as many points as there are.
---
John

                        
Re: Curve Fitting for the HP 35s
Message #12 Posted by Stefan Vorkoetter on 20 Oct 2007, 3:10 p.m.,
in response to message #11 by John Wasilewski

Quote:
Do you know, I didn't know it was possible to fit a polynomial to a set of points exactly!

Really!?

Consider the simplest case of fitting y=ax+b to two points x1,y1 and x2,y2. It's just a matter of solving the simultaneous equations,

y1 = a * x1 + b

y2 = a * x2 + b

for a and b given x1,y1 and x2,y2.

For a quadratic ax^2 + bx + c and three points, it's the solution of,

y1 = a * x1^2 + b * x1 + c

y2 = a * x2^2 + b * x2 + c

y3 = a * x3^2 + b * x3 + c

for a, b, and c.

And so on.

Stefan

                              
Re: Curve Fitting for the HP 35s
Message #13 Posted by John Wasilewski on 20 Oct 2007, 6:58 p.m.,
in response to message #12 by Stefan Vorkoetter

Brain evidently not engaged when I sent my last comment!

      
Re: Curve Fitting for the HP 35s
Message #14 Posted by Eddie W. Shore on 24 Oct 2007, 11:42 p.m.,
in response to message #1 by Stefan Vorkoetter

Thank you. The program runs well and it gives the 35s a great service while only using one label instead of many.


[ Return to Index | Top of Index ]

Go back to the main exhibit hall