
×InformationFix Windows 10 Update Issues
Resolve Windows 10 related issues for your HP computers or printers by HP Windows 10 Support Center

×InformationFix Windows 10 Update Issues
Resolve Windows 10 related issues for your HP computers or printers by HP Windows 10 Support Center
 HP Community
 >
 Other Products
 >
 Calculators
 >
 [HP Prme] Spreadsheet containing Solve set of equations  a ...
 Mark Topic as New
 Mark Topic as Read
 Float this Topic for Current User
 Bookmark
 Subscribe
 Mute
 Printer Friendly Page
Create an account on the HP Community to personalize your profile and ask a question
[HP Prme] Spreadsheet containing Solve set of equations  a request for ideas.
09082018 01:57 PM
I'd like to ask your help with creative ideas.
I guess it's gonna take some time to reach the final solution. But ideas for the small steps will certainly be very useful.
I intend to solve a linear system using Spreadsheet as user's interface that may run a solve set of equations in background.
Please think about 3 or for rows of repetitive calculations through which the user will input all numerical data available and then the Solve app calculates the missing data. This calculation might be triggered by pressing a button.
Ideas are welcome.
Thank you.
Regards,
Ciro.
09092018 11:56 PM
Hello,
Althrough they are other ways to do it (for example with an app program)... Here is one sollution.
It is kind of kludgy due to some idiosyncraties of the spreadsheet, but it works..
Assume that you enter the system in A1:C4, enter, for A5, the following formula:
=M3:=((M2:=A1:C3)^(1)*(M1:=D1:D3))
Then, enter for A6 to C6: =M3(1), =M3(2) and =M3(3)
Here is why/how it works.
On the mathematic sides of thing, it works because if you put your system in a 3*3 matrix (M) form with the right side of the ax+by+cz=d equations in a vector (V), M^1*V returns a vector which are the values for x, y and z... But I assume that you knew that.
A1:C3 will return a list of list which correspond to the "system" part of things. The problem is transforming it into a matrix. the cas list2mat can do this, BUT the cas can not extract values from the spreadsheet in the A1:C3 form as it does not know how to handle the ":" charater 😞
Hence the trick of storing the list of list into the M1 global variable. Since M1 is a matrix, the store operation will internally convert the list of list into a matrix and RETURN said matrix. Causing the transformation of the list of list into a matric.
We do the same for D1:D3 (vector) and M2. We can now easely do the math...
Now the next step is the extraction of the 3 components of the responce.
Normally var(n), when var is a composit (list or matrix) gives access to the various elements...
Problem is that in the spreadsheet, call(n) gives access to the cell meta data (value, equation, format...).
Which is why the equation in A5 has the M3:= store. This make sure that the result vector is stored in M3 and allows the A6, B6 and C6 to access the nth elements of the result...
As as I said, kludgy, but works...
Cyrille
09102018 03:17 AM
To answer the other part of your question, there is no way to put a "button" to start a calculation. Spreadsheets always just calculate when changes happen. I'm not sure if I've ever seen one that allows you to have buttons to "start" or anything.
Although I work for the HP calculator group as a head developer of the HP Prime, the views and opinions I post here are my own.
09102018 05:47 AM
Hello,
By using a choose in the spreadsheet, you can do some type of UI driven program calls.
See the spreadsheet choose function help (Main, HP Apps, Spreadsheet, spreadsheet choose)...
Cyrille
09102018 08:43 PM
Yes, I'm using a CHOOSE already.
I must choose one component to be something like a "pivot" of the whole system.
I've seen you've given a very detailed idea. I should save tomorrow evening to read it mindfully and try it. I might return you some questions.
Thank you very much.
Best regards,
Ciro.
09102018 08:52 PM
Yes, I've seen it.
In fact, now I'm not sure it would be realy necessary.
When filling the spreadsheet with known value, I thought about placing the cursor somewhere at the "pivot" component's column, so the "Solve" considered these data as "frozen" and taking them to calculate the rest of the table.
I guess CHOOSE is doing the job quite well.
But I still am not sure exactly how to implement solve feature inside the spreadsheet.
Thank you very much.
Best regards,
Ciro.
09112018 05:38 PM
Hello Cyrille
Your solution is creative and sounds feasible. I guess the data extraction can be done in a program running loops and character recognition for data separation.
Reading the explanation I guess you understood by "solve" the CAS line command. However, I have in mind the Solve App. The option for combining both Apps (Spreadsheet and Solve) relies on two main reasons. Spreadsheet has the capability of showing data and data fields in organized way, making it easy for the user to read and input data. Solve allows the user to feed data according to their availability, leaving enpty the unknown value cells, then unknown data are calculaed
Thank you very much.
Regards,
Ciro..
Didn't find what you were looking for? Ask the community