specfunc

2,880 views
Skip to first unread message

Jimmy Fullerenex

unread,
May 31, 2011, 9:49:52 PM5/31/11
to Nspire Group

I've downloaded a copy of Lars Frederiksen's specfunc.tns (attached) and found it really awesome. (from Univers-TI http://www.univers-ti-nspire.fr/activites.php?lang=&ress_id=82#activite)

But yet while I was testing the function iLaplace() the other day, a bug appeared: when I got in iLaplace(-ln(s)) [the result should be 1/t], the system returned "Too Many Arguments" and located the error in ilapsub() at line 364. Hope anyone could check that out and correct it.
I know that I should contact the author, but the email address contained in the document (a comment in function lapsub() )seems to be invalid.
Thanks.
Cheers,
Jimmy Fullerenex

specfunc.tns

electroscott

unread,
Jun 1, 2011, 1:43:09 AM6/1/11
to tinspire
I get the "too many arguments" as well, including iLaplace(ln(s)).
However, this is a transform that I've never run into. Maple cannot
inverse Laplace transform -ln(s), nor ln(s), using its built-in
inttrans libraries. Also, my HP50G, with native Laplace/iLaplace
capabilities, fails to give a result for either (1) Laplace
transforming 1/t, and (2) inverse Laplace transforming -ln(s).

How did you determine that the inverse Laplace of -ln(s) should be 1/
t? If I use the integral definition, lim(T=infinity,integral(1/t*exp(-
s*t),t,0,T)) I get "infinity" due to the 1/t term in the limit as T-
>0, so this is something I can't do even with the formal integral/
kernel definition of the Laplace transform.

BTW, I only use the specified library--I don't know anything about the
author(s). I did print out the program so that I could better
understand how it works, though :)

--Scott




On May 31, 6:49 pm, Jimmy Fullerenex <smoat...@gmail.com> wrote:
> I've downloaded a copy of Lars Frederiksen's specfunc.tns (attached) and
> found it really awesome. (from Univers-TIhttp://www.univers-ti-nspire.fr/activites.php?lang=&ress_id=82#activite)
> But yet while I was testing the function iLaplace() the other day, a bug
> appeared: when I got in iLaplace(-ln(s)) [the result should be 1/t], the
> system returned "Too Many Arguments" and located the error in ilapsub() at
> line 364. Hope anyone could check that out and correct it.
> I know that I should contact the author, but the email address contained in
> the document (a comment in function *lapsub()* )seems to be invalid.
> Thanks.
> Cheers,
> Jimmy Fullerenex
>
>  specfunc.tns
> 16KViewDownload

Jimmy Fullerenex

unread,
Jun 1, 2011, 1:52:58 AM6/1/11
to tins...@googlegroups.com
Actually I'm just testing (take it literally). Because laplace(1/t) in this document returns -ln(s), so I assume iLaplace(-ln(s)) should return 1/t, as a matter of consistency. Otherwise at least one of the two programs should have bugs.
Also, the error where "too many arguments" is obviously a typo or something, since ilaplace() at line364 allows indeed only one argument. In any sense, there must be flaws here. Unfortunately I just cannot contact the author (otherwise I would've done that long before). So (since you printed out the program ;) ) if you can get everything straight and correct the known flaw, I'd be really grateful.
Cheers,
Jimmy Fullerenex



2011/6/1 electroscott <electr...@gmail.com>

--
To post to this group, send email to tins...@googlegroups.com
To unsubscribe send email to tinspire+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com.au/group/tinspire?hl=en-GB?hl=en-GB
The tns documents shared by group members are archived at
http://lafacroft.com/archive/nspire.php

electroscott

unread,
Jun 4, 2011, 2:41:00 PM6/4/11
to tinspire
Oh I see. Given those parameters, I'm going to see if I can "step
through" the laplace code and find why it's returning -ln(s). I
suspect that it may have something to do with integrating 1/t with a
change of variables...the code is extremely hard to follow, though..

--Scott


On May 31, 10:52 pm, Jimmy Fullerenex <smoat...@gmail.com> wrote:
> Actually I'm just testing (take it literally). Because laplace(1/t) in this
> document returns -ln(s), so I assume iLaplace(-ln(s)) should return 1/t, as
> a matter of consistency. Otherwise at least one of the two programs should
> have bugs.
> Also, the error where "too many arguments" is obviously a typo or something,
> since ilaplace() at line364 allows indeed only one argument. In any sense,
> there must be flaws here. Unfortunately I just cannot contact the author
> (otherwise I would've done that long before). So (since you printed out the
> program ;) ) if you can get everything straight and correct the known flaw,
> I'd be really grateful.
>  Cheers,
> Jimmy Fullerenex
>
> 2011/6/1 electroscott <electrosc...@gmail.com>

Glenn

unread,
Jun 4, 2011, 7:57:41 PM6/4/11
to tinspire
Jimmy,

You might want to take a look at my laplace functions.
Go to http://gefisher.comxa.com/gindex.html
and follow the TI-Nspire Documents link to MyLib and click on the
readme file for what's available.
tf.tns is the laplace transforms, which uses i.tns and u.tns.

Let me me know what you think.
Glenn.

On May 31, 8:49 pm, Jimmy Fullerenex <smoat...@gmail.com> wrote:
> I've downloaded a copy of Lars Frederiksen's specfunc.tns (attached) and
> found it really awesome. (from Univers-TIhttp://www.univers-ti-nspire.fr/activites.php?lang=&ress_id=82#activite)
> But yet while I was testing the function iLaplace() the other day, a bug
> appeared: when I got in iLaplace(-ln(s)) [the result should be 1/t], the
> system returned "Too Many Arguments" and located the error in ilapsub() at
> line 364. Hope anyone could check that out and correct it.
> I know that I should contact the author, but the email address contained in
> the document (a comment in function *lapsub()* )seems to be invalid.
> Thanks.
> Cheers,
> Jimmy Fullerenex
>
>  specfunc.tns
> 16KViewDownload

electroscott

unread,
Jun 5, 2011, 3:49:42 PM6/5/11
to tinspire
Glenn,

Thanks for the library documents. Nice work.

My tf\lp(1/t,t,s_) returns 1/(s_*t) but when I put it back to ilp(1/
(s_*t),s_,t) I get "Error: Variable is not defined"

--Scott


On Jun 4, 4:57 pm, Glenn <gefis...@mac.com> wrote:
> Jimmy,
>
> You might want to take a look at my laplace functions.
> Go tohttp://gefisher.comxa.com/gindex.html

Wayne

unread,
Jun 5, 2011, 4:19:48 PM6/5/11
to tinspire
I am sure already knows this, but just to make sure: the Laplace
transform for 1/t is divergent.

electroscott

unread,
Jun 6, 2011, 11:36:43 AM6/6/11
to tinspire
Yes. I'm just following up with an example provided by the OP. We
expect an error message (warning?) for those transforms that don't
have a solution.

Jimmy Fullerenex

unread,
Jun 7, 2011, 12:15:41 AM6/7/11
to tins...@googlegroups.com
The algorithm still needs debugging, obviously. I'm looking forward to help. Since TI refuses to incorporate Laplace() into OS, we have to prefer homemade one. :)

2011/6/6 electroscott <electr...@gmail.com>
--
To post to this group, send email to tins...@googlegroups.com
To unsubscribe send email to tinspire+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com.au/group/tinspire?hl=en-GB?hl=en-GB
The tns documents shared by group members are archived at
http://lafacroft.com/archive/nspire.php



--
Cheers,
Jimmy Fullerenex

electroscott

unread,
Jun 9, 2011, 10:54:28 AM6/9/11
to tinspire
It's all good. I've been digging through the code to see where 1/t
explodes, and I'd post/highlight some of my findings but I'm not sure
how to reference anything. In order for me to print out a program
listing, I have to open a Word document, then click on the Nspire SS
program, highlight it, and copy it over to Word. Then, I have to
format it all nice 'cause sometimes it's just a continuous program and
I have to break it at the ":" mark. Of course, I change the font to
"TI Nspire" as well. I could try to use PSPad so I can print out line
numbers, but I'm wondering if there's a proper editor that can read a
native .tns extension/program and edit it (other than the Nspire SS)?

Are there better programming environments for the PC, apart from copy/
paste from the TI-Nspire SS? In order to open a program to copy on
the Nspire, I have to (1) add a page, (2) add a program editor app,
(3) select open and navigate to the function/program I want, (4)
select all and copy to clipboard, (5) paste it into Word ... rinse and
repeat. If I just "casually" try to replace the current program page
with a different function to edit, I end up getting a split screen,
and CTRL+6 doesn't work from the computer keyboard to ungroup the
apps, so I then have to navigate to the CAS calculator keyboard on the
Nspire student software and click CTRL and then click 6 in order to
ungroup--a real PITA! I repeated this process a large number of times
to get the full specfunc library into a document that was viewable/
printable.

How this SW was written/ported in the first place is amazing and kudos
to the authors/porters who did this--I'm not complaining, just trying
to help make it work.

Cheers,
--Scott


On Jun 6, 9:15 pm, Jimmy Fullerenex <smoat...@gmail.com> wrote:
> The algorithm still needs debugging, obviously. I'm looking forward to help.
> Since TI refuses to incorporate Laplace() into OS, we have to prefer
> homemade one. :)
>
> 2011/6/6 electroscott <electrosc...@gmail.com>

Jimmy Fullerenex

unread,
Jun 11, 2011, 12:50:08 AM6/11/11
to tins...@googlegroups.com
So you've found out where the function explodes? Have you sought out how to correct the "too many arguments" error? Thx.
Cheers,
Jimmy Fullerenex



2011/6/9 electroscott <electr...@gmail.com>
Reply all
Reply to author
Forward
0 new messages