**HP Prime Spreadsheet App Tutorial 5: Spreadsheets and Histograms**

Lesson 5
Objectives:

* Generate a
random list of integers for a column

* Store a
Spreadsheet column to a Statistics Variable

* Use a
Spreadsheet column in a histogram

Generate a random
list of integers:

RANDINT(length
of list, lower limit, upper limit). The
result is a list.

Steps:

1. Start by selecting the header cell for Column
A. Press [ Toolbox ], 5 for Probability,
4 for Random, 2 for Integer to call the RANDINT function. A list a generated, so no equals sign is
needed. Enter 100 for the length of
list, 0 for the lower limit, and 100 for the upper limit. The result is RANDINT(100,0,100). Press the soft key ( OK ).

2. Name Column A DATA. Go to the header cell, enter DATA, and press
on the soft key ( Name ).

3. Press the [ Home ] button. Select the D1 variable from the Statistics
1Var app by pressing [ Vars ], the ( App ) soft key, then Statistics 1Var, then
Numeric, and D1.

4. Continue by entering ≔DATA.
(colon, equals, DATA). The
complete command should be Statistics_1Var.D1≔DATA.

5. On to the Histogram: Press the [ Apps ] and choose the Statistics
1Var app. You’ll be taken to the Num
view and D1 should be filled in.

6. Press the [ Symb ] key for the Symbolic
view. Enter D1 for H1 and select
Histogram.

7. Press [ Shift ], [ Plot ] (Plot
Setup). Change the H Width to 10.

8. Press [ View ] and select
Autoscale. This Histogram is complete.

This
concludes Lesson 5. I plan to post additional
lessons in the near future.

Eddie

This blog is
property of Edward Shore, 2015.

Hello Eddie,

ReplyDeleteThank you very much for this tutorial series. I'm taking Intro to Microeconomics and using the HP Prime calculator spreadsheet app to program some repetitive calculations. Is there a way (that I'm obviously missing) to save a spreadsheet file and later load that file? Or is the spreadsheet app completely working memory based?

Thank you so much,

Chuck

Well, I just found the answer to my own question. With the spreadsheet constructed, return to the APPS screen and select "Save" and provide a name. To load, simply highlight the newly saved spreadsheet and hit "Enter". Sorry for any inconvenience.

ReplyDeleteHi Eddie,

ReplyDeleteup to now all tuts did work as they should. But this one wont. If I clear the table and set the cursor to the head of col A and call RANDINT(100,0,100), I get a huge table. Trying Randint(3,0,3), I get in col A more than 1000 rows with 0 (os 1 or 2 or 3), same in col B and in col C also same. First number in Randint gives the number of columns, 2nd and 3rd the min and max. I never get the result that you are showing with only a filled col A. You are describing every single step, so there is no possibility for doing anything wrong.