Hey guys. I know I've been absent due to holidays, but i've been in and out to check on things...

I have a question. Using the DCS stuff, how is it possible to have a small line of text displayed on Mouseover of a GUIRButtonImg?
BASIC or Asm?
asm.
Moved to z80 Assembly programming forum.
ACagliano wrote:
I have a question. Using the DCS stuff, how is it possible to have a small line of text displayed on Mouseover of a GUIRButtonImg?
Hmm, that's tricky. The best thing to do would be a little mousehook that "clicks" out of the mouse when you enter the button area, pushes the text, and goes back into the mouse, then "clicks" out of the mouse and pops the text when the mouse leaves the button area.
Hmm. I think I'll forgo that. lol

A bit off topic, but I've been wondering...I'm sure you all know how to use the calc's matrixes to solve a system of equations. I've been taught that that method only works for a matrix where the #rows=#columns. Is that true? Is there a workaround for that?
No, you could use a matrix like this:
[ 1 -3 4 ]
[ 2 3 -5 ]
to represent the equations x-3y=4 and 2x+3y=-5. Then, you would just use the rref( function to solve the system.
Indeed, Row Echelon Format or Reduced Row Echelon Format (ref/rref) are the way that you want to go. I wrote a rref() solver at ine point, if I recall:

http://www.cemetech.net/programs/index.php?mode=file&id=218
Nice...perhaps I should reveal my purpose...I've researched and found out that a pretty comprehensive algorithm for balancing a chemical equation is to create a system. For example, take the photosynthesis formula:

CO2 + H2O --> C6H12O6 + O2

It can be rewritten as:

a(CO2) + b(H2O) --> c(C6H12O6) + d(O2)

And three equations formed, one for each atom type, where we are looking at the subscript of the atom of interest.

C: 1a + 0b = 6c + 0d
H: 0a + 2b = 12c + 0d
O: 2a + 1b = 6c + 2d

Solving the system for each variable should render the coefficients. You guys probably already knew this, but I explain just in case. This is my purpose.


Edit: and Oh...given that my language of choice is assembly, what is the format of a matrix variable? And is there a way to execute rref( in z80, maybe through a call or something?
To be honest, just as I rebuke people for using Axe when they're working on a project better suited for assembly, here you're much better off just writing a BASIC program to do this. I'd of course encourage you to use the DCSB Libs to make it nice and GUIful, but there's no sense trying to do it in ASM when BASIC makes matrix and floating-point manipulation so easy.
I know that, and I likely will end up going with Basic. I'm just trying to challenge myself TO do it in assembly...since I know it has to be possible or else the calc couldn't do it to begin with...I am kind of determined to succeed at this Smile
ACagliano wrote:
I know that, and I likely will end up going with Basic. I'm just trying to challenge myself TO do it in assembly...since I know it has to be possible or else the calc couldn't do it to begin with...I am kind of determined to succeed at this Smile
Yes, you can manipulate matrices in ASM by findsym'ing them and directly modifying their bytes; ASM in 28 Days and the TI SDK PDF both discuss the format of matrices. For rref(), I don't think there's a bcall() for it, so you'd have to make a temp program via ASM and parseInp() it.
KermMartian wrote:
For rref(), I don't think there's a bcall() for it, so you'd have to make a temp program via ASM and parseInp() it.

Or just implement Gauss-Jordan....
elfprince13 wrote:
KermMartian wrote:
For rref(), I don't think there's a bcall() for it, so you'd have to make a temp program via ASM and parseInp() it.

Or just implement Gauss-Jordan....
Well yeah, but then you still have to deal with re-inventing the wheel, which is not really necessary here. Razz
KermMartian wrote:
elfprince13 wrote:
KermMartian wrote:
For rref(), I don't think there's a bcall() for it, so you'd have to make a temp program via ASM and parseInp() it.

Or just implement Gauss-Jordan....
Well yeah, but then you still have to deal with re-inventing the wheel, which is not really necessary here. Razz


But it would probably run a little faster than trying to do it via TI-BASIC and loading the interpreter.
True, but it would be slower and more complex to implement, which might not be worth it for the speed increase, in my opinion.
What the heck is ParseInp( and what the heck is Gauss-Jordan? lol
ParseInp is a bcall, and Gauss-Jordan is an algorithm
So, those are my only options? There is no entry point into the rref( token that I can call into?

Edit: So, now can a {n x n-2} matrix be rref'ed?
souvik1997 wrote:
ParseInp is a bcall, and Gauss-Jordan is an algorithm
And Google would have helped you learn that as well. Wink

Quote:
Edit: So, now can a {n x n-2} matrix be rref'ed?
No. You need to have the same number of variables and equations, otherwise you cannot find an exact solution.

Edit: Let me clarify. You need at least as many equations as you have variables. N rows and N-2 columns would mean N equations and N-2 variables, which is fine.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 3
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement