## 43S Alternative key layout --> WP43C

General discussion about calculators, SwissMicros or otherwise
Jaymos
Posts: 664
Joined: Sun Nov 04, 2018 7:03 pm
Location: Cape Town

### Re: 43S Alternative key layout --> WP43C

I have a question regarding the graphical representations:

I am adding numerical integration and numerical differentiation to the graph module, intended to be restricted to a simple menu button to click, to show said points on screen. More accurately, it is not integration but discrete trapezoidal sum points and not differentiation but discrete Δy/Δx slope points.

These menu options simply look at the x,y pair graphing values stored in the STAT memory and perform the said discrete calcs for every consecutive sample and plot the result together with the main graph.

It is clear that for a slope point Δy/Δx, the slope value should be placed in between sample points, i.e. mid point, at x1+Δx/2.
My question is where to show the integration point ½Σ(y2-y1)Δx, i.e. at left edge x1, right edge x2, or mid point x1+Δx/2. Currently I do mid-point.
I do not really find references on Wiki of where this is done. Yes, there are ideas on the Riemann Sums on the left, and on the right, but not on the trapezoid sum which I have here, and not where to graph it. I can understand putting it on the right hand side as that would indicate the preceding area, but for graphing it, it probably makes more sense on the mid point, together with the slope value.

The below program and graph illustrates it:

Code: Select all

XEQC43 XEQLBL 13 TRAPZ
CLSUM
0 ENTER 0 SUM+
1 ENTER 0.001 SUM+
1 ENTER 1 SUM+
0 ENTER 1.001 SUM+
3 ENTER 2 SUM+
0 ENTER 3 SUM+
3 ENTER 4 SUM+
0 ENTER 4.001 SUM+
PLOT

.
Clipboard34.png (190.47 KiB) Viewed 774 times
On the graph, the blue dots clearly show the current mid point sum placement, and the red arrows and red circles show the possible moving of these points to the right hand side.
.
.
20201031-14274700.bmp (12.31 KiB) Viewed 774 times
Placement of the integration point does not make a difference if there are 400 sample points, as the function and its integral illustrates above. This is sinc𝝿 with the discrete integral button (ΣȳΔx) ticked, showing the approximated integral from -10𝝿 to +10𝝿, which approximates unity.
Jaco Mostert
Elec Eng, South Africa
C43 (WP34C) on DM42 sn. 03818 & 06199 for complex math, HP42S; HP32Sii, WP34S&C, HP28C, HP35s, EL-506P, EL-W506, PB700; owned FX702P & 11C; used HP67 & HP85; iOS: 42s Byron, Free42, WP31S/34S, HCalc.
bruno_h
Posts: 3
Joined: Wed Sep 30, 2020 1:26 am
Location: Paris, France

### Re: 43S Alternative key layout --> WP43C

Great job here!
IMO, the placement of the point should be on the right, allowing easier visualisation of the surface calculated by making with the previous one a diagonal of the area box, as your graphics clearly illustrate.
PierreMengisen
Posts: 127
Joined: Wed Nov 29, 2017 1:38 pm
Location: Neuchâtel CH

### Re: 43S Alternative key layout --> WP43C

It seems to me that in order to represent these values the choice must be made only as an abscissa value over the whole interval.
Discr.jpg (12.62 KiB) Viewed 741 times
Pierre
[TI59 with PC100C; TI-84 Plus CE-T; HP41CV with HP IL loop & 2*82161A DCD & 82162 TP; HP15C; HP28S; DM41; DM41L; DM42; DM41X]
bruno_h
Posts: 3
Joined: Wed Sep 30, 2020 1:26 am
Location: Paris, France

### Re: 43S Alternative key layout --> WP43C

Jaymos
Posts: 664
Joined: Sun Nov 04, 2018 7:03 pm
Location: Cape Town

### Re: 43S Alternative key layout --> WP43C

Thank you - good ideas.

I implemented the last proposal, maybe consider it and see if it can still improve
.
20201101-00040300.bmp (12.31 KiB) Viewed 699 times
Original example, with the horizontal lines Δx width. The centre mark remains.
.
20201101-00353300.bmp (12.31 KiB) Viewed 699 times
Example of a linear slope with slight randomness added, the triangles show the Δy/Δx is not constant, and the integral shows the horizontal discrete lines.
Jaco Mostert
Elec Eng, South Africa
C43 (WP34C) on DM42 sn. 03818 & 06199 for complex math, HP42S; HP32Sii, WP34S&C, HP28C, HP35s, EL-506P, EL-W506, PB700; owned FX702P & 11C; used HP67 & HP85; iOS: 42s Byron, Free42, WP31S/34S, HCalc.
Jaymos
Posts: 664
Joined: Sun Nov 04, 2018 7:03 pm
Location: Cape Town

### Re: 43S Alternative key layout --> WP43C

Be sure to delete the binary.bin file from the C43 folder prior to running.
Thanks Dani for the help compiling!

Be sure to do CLR/RESET after resetting the first time.
The C43 firmware still requires DM42 DMCP firmware 3.18 or 3.20.

I got my new DM42 and replaced the PCB on the old one. Bottom line: both DM42's are working well. Serial numbers updated in my sig. The new PCB replacing my 18 month old DM42 PCB is now labelled "calcbase3c" whereas it was "calcbase3b". Both PCB's carry the SwissMicros 2017 copyright notice, so the change seems old unless the year did not change.

More specifically: I do (really) like the new DM42 keyboard clicky feel, and the old DM42 is now vastly better with the new PCB and domes supplied by SM as part of the repair/replace. Both my DM42s now have positive click keys and I find it better and preferable to those on the old DM42. Both units exhibit the reported strange double click on the ENTER key, but to me it is not disturbing at all, especially knowing it is simply due to two adjacent clicky new domes underneath the ENTER key. A non-issue. After all, I do not slide-press my ENTER key and if I would, a single press still registers. The double clicky thing does not influence reliable pressing - it is simply a surprising tactile feedback sensation.

I received a report from a user stating that C43 release 43, ran a DM42 battery down overnight. Could anyone experiencing power related issues on either C43 or WP43S please speak up? If any, please report the C43 release version number, also the DMCP version. Under investigation ... but like any investigation, we need some evidence on when what happens.

This week I have the following changes:

Mostly my own graph module improvements due to no hardware testing being available for me. This included PLOT menu changes, integral sums and slope graphs, I am not repeating the previous details posted. The menu structure below, now includes DEMO1-6 data as can be seen. I am pretty satisfied with the outcome of this module and I will probably add to it again once the WP43S RPN formulas can work. Currently the graphing can be used to visualise STAT Σ+ input, either manually entered, or entered by program, which is how I generate the various graphs previously posted. When named RPN programs become available on WP43S, I intend adding a sub menu to plot multiple named RPN (formula) graphs (Y), within stated X ranges.

In this release simulator has some extra info on the console. We may have forgotten to switch off the debugging info. No detriment to use the simulator like this, but I'll see how to make it less ... the reality is, the real verbose mode is already switched off ...
.
Clipboard37.png (133.42 KiB) Viewed 625 times
The STAT/PLOT menu appearing when plotting the STAT data.
Jaco Mostert
Elec Eng, South Africa
C43 (WP34C) on DM42 sn. 03818 & 06199 for complex math, HP42S; HP32Sii, WP34S&C, HP28C, HP35s, EL-506P, EL-W506, PB700; owned FX702P & 11C; used HP67 & HP85; iOS: 42s Byron, Free42, WP31S/34S, HCalc.
pauli
Posts: 119
Joined: Tue May 02, 2017 10:11 am
Location: Australia

### Re: 43S Alternative key layout --> WP43C

For integration, why not draw the trapezoids? Failing that, the midpoint seems like a reasonable option. It could be misleading since you'll be displaying a rectangle but computing a trapezoid. I.e. the height of the rectangle bears little relationship to the value of the function at the midpoint.

For differentiation, there are numeric methods for estimating the slope at the end points. For example here. There are higher order methods which are often more accurate and since you're plotting the values, the function will have been evaluated at several equally spaced points already -- i.e. they will be very quick to compute.

Pauli
Jaymos
Posts: 664
Joined: Sun Nov 04, 2018 7:03 pm
Location: Cape Town

### Re: 43S Alternative key layout --> WP43C

pauli wrote:
Mon Nov 02, 2020 1:00 pm
For integration, why not draw the trapezoids? Failing that, the midpoint seems like a reasonable option. It could be misleading since you'll be displaying a rectangle but computing a trapezoid. I.e. the height of the rectangle bears little relationship to the value of the function at the midpoint.

On the last published example, I am plotting the horizontal line through the midpoint, not a rectangle. You might be confusing the coloured rectangles which I placed with PowerPoint.

I find it difficult to imagine how to draw the trapezoid, as only for the first interval, the trapezoid may resemble what you expect, i.e. to show the slither of area.

The problem is when you calculate the y sum for each x sample, each successive term in the sum will take you further away from the previous sum value for positive sample values. So the problem becomes where would you place the trapezoids because they can not be drawn on the source data, which already is drawn as point to point lines, i.e. the trapezoids will coincide and not be visible. Each trapezoid should maybe start on the edge of the previous one, and that may look ugly for negative sample values.

Any sketch of what could be useful maybe?

For differentiation, there are numeric methods for estimating the slope at the end points. For example here. There are higher order methods which are often more accurate and since you're plotting the values, the function will have been evaluated at several equally spaced points already -- i.e. they will be very quick to compute.
The main problem is that the source data is the STAT data, i.e. the stored x,y pairs, and as such, this could be arbitrary x-spacing, and not neccesarily equal spacing. On the other hand I can easily determine if the data is equally spaced, and if so, can then do interpolation for slopes, otherwise not. I will look at that solution.
Jaco Mostert
Elec Eng, South Africa
C43 (WP34C) on DM42 sn. 03818 & 06199 for complex math, HP42S; HP32Sii, WP34S&C, HP28C, HP35s, EL-506P, EL-W506, PB700; owned FX702P & 11C; used HP67 & HP85; iOS: 42s Byron, Free42, WP31S/34S, HCalc.
pauli
Posts: 119
Joined: Tue May 02, 2017 10:11 am
Location: Australia

### Re: 43S Alternative key layout --> WP43C

I understand the problem now: you're trying to display the cumulative integral.
The horizontal line segments seem like a reasonable idea as might joining the corners of the squares in this image. The integral and the function should only interfere in a small number of places.

Pauli
Jaymos
Posts: 664
Joined: Sun Nov 04, 2018 7:03 pm
Location: Cape Town

### Re: 43S Alternative key layout --> WP43C

I tried some options, and found that two rectangles added, the first showing the previous cumulative value, as well as another stacked rectangle showing the increment. And a diagonal line. I find that intuitive.

It is a lot of lines though. Question is, is this more useful?

If it seems useful, I can add an option button for that as in some cases it may be a lot of clutter, but it does make a good graph though.
.
20201103-22190200.bmp (12.31 KiB) Viewed 429 times
.
20201103-22130200.bmp (12.31 KiB) Viewed 429 times
The side effect of tighter equally spaced graphs, is quite spectacular and I like that.
.
Jaco Mostert
Elec Eng, South Africa
C43 (WP34C) on DM42 sn. 03818 & 06199 for complex math, HP42S; HP32Sii, WP34S&C, HP28C, HP35s, EL-506P, EL-W506, PB700; owned FX702P & 11C; used HP67 & HP85; iOS: 42s Byron, Free42, WP31S/34S, HCalc.