11-16-2014, 12:26 AM

In my physics lab the other night, we were validating the equation for the magnetic force on a current carrying wire: Force = Current*Length*MagneticField. The HP Prime was very useful and the students like it over their TI-84 and nSpire calculators - the touchscreen was a hit, as well as a more rational layout of keys.

We used the Spreadsheet app to collect our raw data and process it. Then we copied the appropriate columns into the Statistics_2Var app so we could calculate statistics for the Force vs Current and Force vs Length graphs. The magnetic field was fixed but we didn't know it's strength. So I set up a regression between Current*Length and Force, knowing the slope would be the magnetic field strength. We got -0.11 Tesla.

I wanted to do inference on the slope (magnetic field), so I started the Inference app, went to the Symbolic view to select the "Regression" method and the "Interval: Slope" type. In the Numeric view the Xlist and Ylist were empty. There didn't seem to be a way for importing from a list from another app. I could do this in the Home view, of course, but I want to get my feet wet learning to program the HP Prime, so I looked for a way to customize the context-sensitive menus at the bottom of the Numeric view. I couldn't find a way to do it in the User Guide.

So I copied the Inference app to "Inference Copy" and then added a VIEW:

EXPORT Inference_Copy()

BEGIN

END;

VIEW "Copy C1, C2 into Xlist, Ylist", COPY_C1C2()

BEGIN

Xlist := Statistics_2Var.C1;

Ylist := Statistics_2Var.C2;

END;

Now I can click on the View button and copy the data in one step. Of course, this could be made more sophisticated (once I learn how) asking me from which app to copy data from, etc.

But I'd really like this operation to be available as a context menu in the Numeric view (where I think it belongs) if the inference method is regression (the other methods have a context menu "Import" which brings in statistics from the other apps).

Is this biting off more than I should chew? Perhaps a better solution is to provide a function for NumSetup?

We used the Spreadsheet app to collect our raw data and process it. Then we copied the appropriate columns into the Statistics_2Var app so we could calculate statistics for the Force vs Current and Force vs Length graphs. The magnetic field was fixed but we didn't know it's strength. So I set up a regression between Current*Length and Force, knowing the slope would be the magnetic field strength. We got -0.11 Tesla.

I wanted to do inference on the slope (magnetic field), so I started the Inference app, went to the Symbolic view to select the "Regression" method and the "Interval: Slope" type. In the Numeric view the Xlist and Ylist were empty. There didn't seem to be a way for importing from a list from another app. I could do this in the Home view, of course, but I want to get my feet wet learning to program the HP Prime, so I looked for a way to customize the context-sensitive menus at the bottom of the Numeric view. I couldn't find a way to do it in the User Guide.

So I copied the Inference app to "Inference Copy" and then added a VIEW:

EXPORT Inference_Copy()

BEGIN

END;

VIEW "Copy C1, C2 into Xlist, Ylist", COPY_C1C2()

BEGIN

Xlist := Statistics_2Var.C1;

Ylist := Statistics_2Var.C2;

END;

Now I can click on the View button and copy the data in one step. Of course, this could be made more sophisticated (once I learn how) asking me from which app to copy data from, etc.

But I'd really like this operation to be available as a context menu in the Numeric view (where I think it belongs) if the inference method is regression (the other methods have a context menu "Import" which brings in statistics from the other apps).

Is this biting off more than I should chew? Perhaps a better solution is to provide a function for NumSetup?