Omnimaga: The Coders Of Tomorrow
Welcome, Guest. Please login or register.
 
Omnimaga: The Coders Of Tomorrow
19 June, 2013, 06:55:45 *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   home   news downloads projects tutorials misc forums rules new posts irc about Login Register  
+-OmnomIRC

You must Register, be logged in and have at least 40 posts to use this shout-box! If it still doesn't show up afterward, it might be that OmnomIRC is disabled for your group or under maintenance.

Note: You can also use an IRC client like mIRC, X-Chat or Mibbit to connect to an EFnet server and #omnimaga.

Pages: 1 [2]   Go Down
  Print  
Author Topic: Sums, Pascal, and Equations for Sets -  (Read 1931 times) Bookmark and Share
0 Members and 1 Guest are viewing this topic.
Xeda112358
Xombie. I am it.
Coder Of Tomorrow
LV12 Extreme Poster (Next: 5000)
*
Offline Offline

Last Login: Yesterday at 21:03:28
Date Registered: 31 October, 2010, 08:46:36
Location: Land of Little Cubes and Tea, NY
Posts: 3781


Topic starter
Total Post Ratings: +614

View Profile
« Reply #15 on: 11 April, 2011, 14:10:39 »
0

^_^ I made one that doesn't have all those decimals, but it is slower to graph. Still, it makes it more accurate when fitting 15 degree polynomials  Big smile

* INTERPL8 v1.10.8xp (0.43 KB - downloaded 58 times.)
Logged



Grammer Download (2.29.04.12)
Latest update (possibly incomplete)
My pastebin
Spoiler for FileSyst:
FileSyst is an application that provides a folder and filesystem for the TI-83+/84+ calculators. It is designed to be easy to access and use in BASIC, and it can be used to access game files and save data, or to create a command prompt, among other things:

Spoiler for Graphiti:
This is a graph explorer for graph theory. It will require lots of work to finish. Currently you can:
Add/delete vertices
Add edges (direction not shown, but they are directed)
Arrange vertices in a circle (in the future, you will be able to define levels of rings and the number of nodes in each)
Create complete graphs quickly

Plans:
Add adjacency matrix viewer
Deleting edges
Multiple graphs support
Arrows for directed graphs
Planarity testing
Matrix operations
Weighted edges
Chromatic polynomials
Chromatic numbers

Spoiler for Stats:

Samocal             [o---------]
Virtual Processor   [o---------]
EnG                 [oo--------]
Grammer             [ooo-------]
AsmComp             [ooo-------]
Partex              [oooo------]
BatLib              [oooooooo--]
Grammer82           [----------]
Grammer68000        [----------]


Pseudonyms:  Zeda, Xeda, Thunderbolt
Languages:   English, français
Programming: z80 Assmebly
             Grammer
             TI-BASIC (83/84/+/SE, 89/89t/92)
Known For:   -Creator of the Grammer programming language
              (Winning program of zContest2011)
             -BatLib- One of the most feature packed libraries for BASIC programmers available
              with over 100 functions and a simple programming language
             -Learning to program z80 in hexadecimal before using an assembler (no computer was
              available!)
╔═╦╗░╠═╬╣▒║ ║║▓╚═╩╝█


Xeda112358
Xombie. I am it.
Coder Of Tomorrow
LV12 Extreme Poster (Next: 5000)
*
Offline Offline

Last Login: Yesterday at 21:03:28
Date Registered: 31 October, 2010, 08:46:36
Location: Land of Little Cubes and Tea, NY
Posts: 3781


Topic starter
Total Post Ratings: +614

View Profile
« Reply #16 on: 06 September, 2011, 03:26:27 »
0

So here is an update. I made a program in Python that will do the same thing as Interpl8 for the calc (pretty much). Just input the list (don't add an ending bracket or starting one) and then when it asks for the file to output to, just do something like equation.txt

* Interpl8 v1.00.py (0.67 KB - downloaded 39 times.)
Logged



Grammer Download (2.29.04.12)
Latest update (possibly incomplete)
My pastebin
Spoiler for FileSyst:
FileSyst is an application that provides a folder and filesystem for the TI-83+/84+ calculators. It is designed to be easy to access and use in BASIC, and it can be used to access game files and save data, or to create a command prompt, among other things:

Spoiler for Graphiti:
This is a graph explorer for graph theory. It will require lots of work to finish. Currently you can:
Add/delete vertices
Add edges (direction not shown, but they are directed)
Arrange vertices in a circle (in the future, you will be able to define levels of rings and the number of nodes in each)
Create complete graphs quickly

Plans:
Add adjacency matrix viewer
Deleting edges
Multiple graphs support
Arrows for directed graphs
Planarity testing
Matrix operations
Weighted edges
Chromatic polynomials
Chromatic numbers

Spoiler for Stats:

Samocal             [o---------]
Virtual Processor   [o---------]
EnG                 [oo--------]
Grammer             [ooo-------]
AsmComp             [ooo-------]
Partex              [oooo------]
BatLib              [oooooooo--]
Grammer82           [----------]
Grammer68000        [----------]


Pseudonyms:  Zeda, Xeda, Thunderbolt
Languages:   English, français
Programming: z80 Assmebly
             Grammer
             TI-BASIC (83/84/+/SE, 89/89t/92)
Known For:   -Creator of the Grammer programming language
              (Winning program of zContest2011)
             -BatLib- One of the most feature packed libraries for BASIC programmers available
              with over 100 functions and a simple programming language
             -Learning to program z80 in hexadecimal before using an assembler (no computer was
              available!)
╔═╦╗░╠═╬╣▒║ ║║▓╚═╩╝█


3rik
LV3 Member (Next: 100)
***
Offline Offline

Gender: Male
Last Login: 02 April, 2013, 22:45:02
Date Registered: 09 August, 2011, 04:04:54
Location: Right over there.
Posts: 92


Total Post Ratings: +8

View Profile
« Reply #17 on: 06 September, 2011, 17:56:11 »
0

I'm not sure if I understood this topic.
Are you trying to find some thing like y=(1.25+0.25i)x4+(-19.5-2i)x3+(82.75+4.75i)x2+(-97.5-3i)x+0 for the set {0, -33, i, 27, 6}?
I used matrices to find the answer and it didn't seem as complicated as that.

I am not in college math so if I totally missed the point please disregard this post.
Logged

Userbars
Xeda112358
Xombie. I am it.
Coder Of Tomorrow
LV12 Extreme Poster (Next: 5000)
*
Offline Offline

Last Login: Yesterday at 21:03:28
Date Registered: 31 October, 2010, 08:46:36
Location: Land of Little Cubes and Tea, NY
Posts: 3781


Topic starter
Total Post Ratings: +614

View Profile
« Reply #18 on: 06 September, 2011, 22:50:51 »
0

This is just my own playing around with math and I don't doubt that there is a much easier way to do this. The method I used is derived from a matrix, actually, too. However, taking the time to squish that matrix down from two dimensions to one was the long, drawn out part. I came up with this as kind of an offshoot of some bigger math problems that I was working on, but I thought it was a neat idea. So yeah, pretty much, this method takes a finite set of data and finds an equation that can model that data.
Logged



Grammer Download (2.29.04.12)
Latest update (possibly incomplete)
My pastebin
Spoiler for FileSyst:
FileSyst is an application that provides a folder and filesystem for the TI-83+/84+ calculators. It is designed to be easy to access and use in BASIC, and it can be used to access game files and save data, or to create a command prompt, among other things:

Spoiler for Graphiti:
This is a graph explorer for graph theory. It will require lots of work to finish. Currently you can:
Add/delete vertices
Add edges (direction not shown, but they are directed)
Arrange vertices in a circle (in the future, you will be able to define levels of rings and the number of nodes in each)
Create complete graphs quickly

Plans:
Add adjacency matrix viewer
Deleting edges
Multiple graphs support
Arrows for directed graphs
Planarity testing
Matrix operations
Weighted edges
Chromatic polynomials
Chromatic numbers

Spoiler for Stats:

Samocal             [o---------]
Virtual Processor   [o---------]
EnG                 [oo--------]
Grammer             [ooo-------]
AsmComp             [ooo-------]
Partex              [oooo------]
BatLib              [oooooooo--]
Grammer82           [----------]
Grammer68000        [----------]


Pseudonyms:  Zeda, Xeda, Thunderbolt
Languages:   English, français
Programming: z80 Assmebly
             Grammer
             TI-BASIC (83/84/+/SE, 89/89t/92)
Known For:   -Creator of the Grammer programming language
              (Winning program of zContest2011)
             -BatLib- One of the most feature packed libraries for BASIC programmers available
              with over 100 functions and a simple programming language
             -Learning to program z80 in hexadecimal before using an assembler (no computer was
              available!)
╔═╦╗░╠═╬╣▒║ ║║▓╚═╩╝█


3rik
LV3 Member (Next: 100)
***
Offline Offline

Gender: Male
Last Login: 02 April, 2013, 22:45:02
Date Registered: 09 August, 2011, 04:04:54
Location: Right over there.
Posts: 92


Total Post Ratings: +8

View Profile
« Reply #19 on: 07 September, 2011, 05:24:30 »
+1

Okay. I do stuff like that too. If you want to see my precalculus method of doing it I put it here.

Spoiler for my method of solving the problem if you're curious:

So the objective of this problem is to find a (n-1)th degree polynomial for a finite set of data with n terms.

So if the set has five terms then the general equation would be

ax4+bx3+cx2+dx+e=t

where x is the term number minus 1 and t is the term and a, b, c, d, e are the coefficients.

Using the example of {0, -33 , i, 27, 6}, we can substitute the values in for x and t.

(in this case we have to make the assumption that 0^0 = 1 or else everything falls apart)

0a + 0b + 0c + 0d + 1e = 0
1a + 1b + 1c + 1d + 1e = -33
16a + 8b + 4c + 2d + 1e = i
81a + 27b + 9c + 3d + 1e = 27
256a + 64b + 16c + 4d + 1e = 6

This is can be solved more easily by using matrices (really you can kinda skip to this step)

[A] =
00001
11111
168421
8127931
256641641

[B] =
a
b
c
d
e

[C] =
0
-33
i
27
6

(excuse my messy matrices)

So [A]*[B] = [C]

Since we already know what [A] and [C] are, we need to solve for [B]

[A]-1*[A]*[B]=[A]-1*[C]
[B]=[A]-1*[C]

Multiply and you'll have your coefficients!



I know the TI-84 and the TI-Nspire CX can handle inverse matrices and I know the Nspire can handle non-real values in the matrices.

Otherwise writing algorithms for this isn't that hard to do.

It works for any length of set as long as you can calculate (n-1)(n-1); but the calculator is often imprecise with inverse matrices.

« Last Edit: 07 September, 2011, 06:01:57 by 3rik » Logged

Userbars
Xeda112358
Xombie. I am it.
Coder Of Tomorrow
LV12 Extreme Poster (Next: 5000)
*
Offline Offline

Last Login: Yesterday at 21:03:28
Date Registered: 31 October, 2010, 08:46:36
Location: Land of Little Cubes and Tea, NY
Posts: 3781


Topic starter
Total Post Ratings: +614

View Profile
« Reply #20 on: 05 August, 2012, 23:02:48 »
0

necro update >.>

Here is an interpolation program that allows you to supply your own x list and y list. Unfortunately, this requires BatLib to be installed as it uses the number to string function (it makes the program much faster, smaller, and I don't need to use other variables).

Now for some more stuff..

I have been working on some pretty cool math that has lead me to figuring out how to make different interpolation models. For example, I could before model data with a polynomial equation, but now I have an algorithm to do exponential data. Here is an example:

I want:
     f(0)=a
     f(1)=b
     f(2)=c
The formula is scary, but really cool:
     f(x)=cx(x-1)/2bx(2-x)a(x-2)(x-1)/2
Try it, it works Cheesy It was a simple process, too. All I did was say:
     eu(0)=a
     eu(1)=b
     eu(2)=c
Then:
     u(0)=ln(a)
     u(1)=ln(b)
     u(2)=ln(c)
Using the first algorithm that I established:
     ln(a) |                    |
     ln(b) |ln(b)-ln(a)         |
     ln(c) |ln(c)-ln(b)         |ln(c)-2ln(b)+ln(a)
;=======
     ln(a) |3ln(b)-2ln(a)-ln(c) |ln(c)-2ln(b)+ln(a)
     ln(b) |ln(b)-ln(a)         |ln(c)-2ln(b)+ln(a)
     ln(c) |ln(c)-ln(b)         |ln(c)-2ln(b)+ln(a)

Then u(x)=ln(a)+x(3ln(b)-2ln(a)-ln(c))+x(x+1)/2(ln(c)-2ln(b)+ln(a)).
Now we use some logarithm rules to simplify:
     u(x)=ln(a)+ln(b3x)-ln(a2x)-ln(cx)+ln(cx(x+1)/2)-ln(bx(x+1))+ln(ax(x+1)/2).
Now substitute in the u(x):
     f(x)=eln(a)+ln(b3x)-ln(a2x)-ln(cx)+ln(cx(x+1)/2)-ln(bx(x+1))+ln(ax(x+1)/2)
Now we reorganise this to make it easier to apply more rules:
     f(x)=eln(a)+ln(b3x)+ln(cx(x+1)/2)+ln(ax(x+1)/2)-ln(a2x)-ln(cx)-ln(bx(x+1))
     f(x)=eln(a)+ln(b3x)+ln(cx(x+1)/2)+ln(ax(x+1)/2)-(ln(a2x)+ln(cx)+ln(bx(x+1)))
     f(x)=eln(a)+ln(b3x)+ln(cx(x+1)/2)+ln(ax(x+1)/2)/e(ln(a2x)+ln(cx)+ln(bx(x+1)))
Now we use more simplification with logs and exponents of the same base:
     f(x)=(ab3xcx(x+1)/2ax(x+1)/2/(a2xcxbx(x+1))
     f(x)=(b3xcx(x+1)/2ax(x+1)/2+1/(a2xcxbx(x+1))
     f(x)=(b3x-x(x+1)cx(x+1)/2-xax(x+1)/2+1-2x
     f(x)=(b-x(x-2)cx(x-1)/2a(x-1)(x-2)/2
     f(x)=(bx(2-x)cx(x-1)/2a(x-1)(x-2)/2


I also went through a similar process for using sine and cosine, but it had some sign issues Undecided (because of how arcsine and arccosine are defined to work as a function). It actually worked for the values I used, but I am pretty sure I put together a data set that failed.

In any event, it might be useful to make a small interpolation suite. It would probably be nice to have a version in BASIC so that folks can study it, but another version in assembly to make a faster and more efficient process.

* INTERPL8 v1.20.8xp (0.27 KB - downloaded 15 times.)
* Readme.txt (5.86 KB - downloaded 15 times.)
« Last Edit: 05 August, 2012, 23:04:54 by Xeda112358 » Logged



Grammer Download (2.29.04.12)
Latest update (possibly incomplete)
My pastebin
Spoiler for FileSyst:
FileSyst is an application that provides a folder and filesystem for the TI-83+/84+ calculators. It is designed to be easy to access and use in BASIC, and it can be used to access game files and save data, or to create a command prompt, among other things:

Spoiler for Graphiti:
This is a graph explorer for graph theory. It will require lots of work to finish. Currently you can:
Add/delete vertices
Add edges (direction not shown, but they are directed)
Arrange vertices in a circle (in the future, you will be able to define levels of rings and the number of nodes in each)
Create complete graphs quickly

Plans:
Add adjacency matrix viewer
Deleting edges
Multiple graphs support
Arrows for directed graphs
Planarity testing
Matrix operations
Weighted edges
Chromatic polynomials
Chromatic numbers

Spoiler for Stats:

Samocal             [o---------]
Virtual Processor   [o---------]
EnG                 [oo--------]
Grammer             [ooo-------]
AsmComp             [ooo-------]
Partex              [oooo------]
BatLib              [oooooooo--]
Grammer82           [----------]
Grammer68000        [----------]


Pseudonyms:  Zeda, Xeda, Thunderbolt
Languages:   English, français
Programming: z80 Assmebly
             Grammer
             TI-BASIC (83/84/+/SE, 89/89t/92)
Known For:   -Creator of the Grammer programming language
              (Winning program of zContest2011)
             -BatLib- One of the most feature packed libraries for BASIC programmers available
              with over 100 functions and a simple programming language
             -Learning to program z80 in hexadecimal before using an assembler (no computer was
              available!)
╔═╦╗░╠═╬╣▒║ ║║▓╚═╩╝█


Pages: 1 [2]   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Powered by MySQL Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Powered by PHP
Page created in 0.495 seconds with 31 queries.
Skin by DJ Omnimaga edited from SMF default theme with the help of tr1p1ea.
All programs, games and songs avaliable on this website are property of their respective owners.
Best viewed in Opera, Firefox, Chrome and Safari with a resolution of 1024x768 or above.