AOA Forums AOA Forums AOA Forums Folding For Team 45 AOA Files Home Front Page Become an AOA Subscriber! UserCP Calendar Memberlist FAQ Search Forum Home


Go Back   AOA Forums > Software > Programming and Assembly Language

Programming and Assembly Language Please read this Topic's rules!!


Reply
 
LinkBack Thread Tools Rate Thread
  #1 (permalink)  
Old 24th October, 2002, 02:42 AM
drow_elf's Avatar
Member
 
Join Date: April 2002
Location: New Mexico, USA
Posts: 721
Send a message via ICQ to drow_elf Send a message via AIM to drow_elf

ti-86 program... grr!

been writing a program to do definite integral approx. but i cant get the Simpson approxiamtion to work right..... both of the others seem to work perfectly... i suspect a variable is getting changed... but i dont see anything that is changing it... and MY logic must be perfect.... anyone see the problem? (i hate programming on these things... such a cramped screen and debuggin is a real pita)

explanation of variables: x-start interval to be integrated; L=end of interval;N=number of iterations;O=offset % for rieman sum.... ooh and several variables get used for different things through the prog...

(comments are denoted by #s)

Code:
 

0->A
Prompt x,L,N,O            #get those numbers! note: we're analysing the eqn y1
x->xx                           #store a dummy; we'll use it later
(L-x)/iPart(N)->N          #make sure that #%^& user entered a whole number!
x+N*O/100->x             #offset the start sample pt for rieman sum
for(x,x,L-(n*0/100),N)  # stmt L-(n*o/100) is untested (was using an if before)
y1+A->A
end
Disp "riemann:",N*A
(evalf(y1,x,xx)+evalf(y1,x,L))/2->A   #dividing 1st and last sample pt of trap integ by 2
for(x,xx+N,L-N,N)                               
y1+A->A
end
Disp "Trap:",N*A
(L-xx)/N->N                            #get back our orginal number N and make it even
if fPart (n/2)==.5:n+1->N
(L-xx)/N->N
evalf(y1,x,xx)+evalf(y1,x,L)->A   #puting the first and last sample in
For(x,xx+N,L-2N,2N)                    #all the odd samples
4*evalf(y1,x,x)+A->A
end
For(x,xx+2N,L-N,2N)                   #even ones
2*evalf(y1,x,x)+A->A
end
Disp "Simpson:",N*A/3            #output
__________________
"Pointillists shouldn't use Scantrons" -me
AOA Team fah
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 28th October, 2002, 01:27 PM
Allan's Avatar
Member/Contributer
 
Join Date: September 2001
Location: Denmark
Posts: 7,914

It takes like forever to program ANYTHING on the TI's. You should get a PC cable and write the programs on your computer instead.
__________________
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 29th October, 2002, 02:37 AM
drow_elf's Avatar
Member
 
Join Date: April 2002
Location: New Mexico, USA
Posts: 721
Send a message via ICQ to drow_elf Send a message via AIM to drow_elf

fixed it it needed l-2n on the very last for loop.... damn i hate programming on these things... that tiny prog (the longest non-assembly one on my calc right now!) takes 5 screens!
__________________
"Pointillists shouldn't use Scantrons" -me
AOA Team fah
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
CPU and RAM monitoring program captaincurran OS, Software, Firmware, and BIOS 5 20th November, 2005 12:45 PM
need help finding a program? sasrob General Hardware Discussion 7 4th August, 2005 10:51 AM
Program? Microgers87 General Hardware Discussion 4 27th August, 2003 03:53 PM
Need program for C++ Allan Programming and Assembly Language 1 19th April, 2003 05:37 PM
is there a program or software too DieHard EPoX MotherBoards 4 7th April, 2003 02:32 PM


All times are GMT +1. The time now is 04:26 PM.


Copyright ©2001 - 2023, AOA Forums
Don't Click Here Don't Click Here Either

Search Engine Friendly URLs by vBSEO 3.3.0