Curve Fitting for the HP 35s



#11

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


#12

?


#13

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

#14

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.


#15

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

#16

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


#17

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)


#18

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

#19

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


#20

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


#21

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


#22

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


#23

Brain evidently not engaged when I sent my last comment!

#24

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


Possibly Related Threads...
Thread Author Replies Views Last Post
  Entering,Saving,and Analysis /Fitting X Y Data on the Prime Harold A Climer 6 1,503 10-26-2013, 01:54 PM
Last Post: Tim Wessman
  Challenge(?): Intersection curve between two cylinders in a specific position Pier Aiello 15 2,566 09-17-2013, 05:58 PM
Last Post: Pier Aiello
  HP Prime : geometry & curve Mic 0 587 09-15-2013, 02:31 PM
Last Post: Mic
  HP 32S-II Vertical Curve Program Ron Cardwell 2 854 05-20-2013, 07:54 AM
Last Post: Thomas Klemm
  Legible version of 29C Curve Fitting program Matt Agajanian 6 1,321 03-21-2012, 07:46 PM
Last Post: Matt Agajanian
  HP 32sII Integration Error of Standard Normal Curve Anthony (USA) 4 937 03-14-2012, 03:18 AM
Last Post: Nick_S
  Algorithm for fitting a logistic curve? Tim Wessman 5 1,094 11-13-2011, 01:22 AM
Last Post: Wes Loewer
  Experience (Learning) Curve Program for HP-41C/CV/CX Chris Catotti 1 676 09-20-2011, 01:46 PM
Last Post: Frido Bohn
  Advantage Pac Curve Fitting mbrethen 9 1,622 06-26-2011, 08:06 PM
Last Post: mbrethen
  i41CX draws sine curve Egan Ford 4 954 04-13-2010, 02:03 PM
Last Post: Egan Ford

Forum Jump: