Post Reply 
fsolve different in Home and CAS?
05-18-2015, 08:21 PM
Post: #1
fsolve different in Home and CAS?
hi,
in a program of mine I'm trying this line
Code:
fsolve(ΣLIST(MAKELIST((flows(I)/X^(I-1)),I,1,SIZE(flows))),X)-1;
(thanks Cyrille and akmon).
Trying with this list
flows:={-79000, 14000, 11000, 10000, 10000, 10000, 9100, 9000, 4500, 100000}

In CAS I get [-1.01369... 0.137197...] (for the program I need only the second, but both are interesting to know)
in Home I get "Error: Bad argument type"

Are the Home/CAS settings relevant or there is a difference for fsolve in the two?

Or the error was generated by ΣLIST or MAKELIST or ...SIZE? Smile

Salvo

∫aL√0mic (IT9CLU) :: HP Prime 50g 41CX 71b 42s 39s 35s 12C 15C - DM42, DM41X - WP34s Prime Soft. Lib
Visit this user's website Find all posts by this user
Quote this message in a reply
05-18-2015, 08:43 PM (This post was last modified: 05-18-2015 08:44 PM by Helge Gabert.)
Post: #2
RE: fsolve different in Home and CAS?
Yes, fsolve is a CAS function. I just tried a simple numerical problem in Home, and fsolve doesn't work there. Not sure if nSolve did work in Home at one time - - but that function is gone with the newest update.

In Home, try FNROOT.
Find all posts by this user
Quote this message in a reply
05-18-2015, 08:45 PM
Post: #3
RE: fsolve different in Home and CAS?
(05-18-2015 08:43 PM)Helge Gabert Wrote:  Yes, fsolve is a CAS function. I just tried a simple numerical problem in Home, and fsolve doesn't work there. Not sure if nSolve did work in Home at one time - - but that function is gone with the newest update.

In Home, try FNROOT

thank you Helge,
so now I think to mage the program for IRR in #CAS version, but then I must solve another question: why in a #CAS program EDITLIST doesn't seem to update a list?

∫aL√0mic (IT9CLU) :: HP Prime 50g 41CX 71b 42s 39s 35s 12C 15C - DM42, DM41X - WP34s Prime Soft. Lib
Visit this user's website Find all posts by this user
Quote this message in a reply
05-18-2015, 08:55 PM
Post: #4
RE: fsolve different in Home and CAS?
Yes, in CAS, EDITLIST doesn't store the new value(s). Either store the individual entries, e.g., MYLIST(5):=22, or store the entire list again, once you exit EDITLIST, because the new values will be echoed to the screen (with STO ->).
Find all posts by this user
Quote this message in a reply
05-18-2015, 08:58 PM
Post: #5
RE: fsolve different in Home and CAS?
(05-18-2015 08:55 PM)Helge Gabert Wrote:  Yes, in CAS, EDITLIST doesn't store the new value(s). Either store the individual entries, e.g., MYLIST(5):=22, or store the entire list again, once you exit EDITLIST, because the new values will be echoed to the screen (with STO ->).

so, in a #CAS program is EDITLIST useless?
There is no way to update a list (or a matrix) in such a program?

Salvo

∫aL√0mic (IT9CLU) :: HP Prime 50g 41CX 71b 42s 39s 35s 12C 15C - DM42, DM41X - WP34s Prime Soft. Lib
Visit this user's website Find all posts by this user
Quote this message in a reply
05-18-2015, 09:00 PM
Post: #6
RE: fsolve different in Home and CAS?
Yes, I'd say don't use EDITLIST in a CAS program, just overwrite the new elements of the lists directly. That works!
Find all posts by this user
Quote this message in a reply
05-18-2015, 09:02 PM
Post: #7
RE: fsolve different in Home and CAS?
(05-18-2015 09:00 PM)Helge Gabert Wrote:  Yes, I'd say don't use EDITLIST in a CAS program, just overwrite the new elements of the lists directly. That works!

ok!

∫aL√0mic (IT9CLU) :: HP Prime 50g 41CX 71b 42s 39s 35s 12C 15C - DM42, DM41X - WP34s Prime Soft. Lib
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)