Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - selectcoaxial

Pages: [1] 2
1
TI-BASIC / Re: DIM Error
« on: April 19, 2012, 02:44:42 am »
Wow, you guys are awesome! So much has been written in just one night :) I came up with an approach similar to runner but instead I used 4 nested for loops :P

2
TI-BASIC / Re: DIM Error
« on: April 18, 2012, 11:05:15 am »
This explains it a bit more spot on. http://mathworld.wolfram.com/Minor.html
So if the i = 2, and j = 2, in my case, X=Y=2, any elements across X's row and Y's column will be removed. So Minor(2,2) would be the matrix without that row 2 and column 2. So effectively, dimension of B, which will contain the matrix minor would have each dimension one less.

3
TI-BASIC / DIM Error
« on: April 18, 2012, 10:11:22 am »
I'm making a program to find the matrix of minors ([wikipedia]http://en.wikipedia.org/wiki/Minor_(linear_algebra[/wikipedia])), and I keep getting a DIM error at [A](I,J)->(M,N). This is my code:

Code: [Select]
Prompt [A]
dim([A])ListDIM
ListDIM(1)->O
{O-1,O-1}->dim([B])
ListDIM->dim([C])

For(Y,1,O)
For(X,1,O)

1üM
1üN
For(I,1,O)
If I "is not equal to" R
1->N
For(J,1,O)
If J "is not equal to" C
[b][A](I,J)->[B](M,N)[/b]
N+1->N
End
End
M+1->M
End
End

det([B])->[C](X,Y)
End
End

Disp [C]

I don't see why I would get this error. Also, I'm basing this code on http://chi3x10.wordpress.com/2008/05/28/calculate-matrix-inversion-in-c/ inside this code block:
Code: [Select]
for(int j=0;j<order;j++)
    {
        for(int i=0;i<order;i++)
        {
            // get the co-factor (matrix) of A(j,i)
            GetMinor(A,minor,j,i,order);
            Y[i][j] = det*CalcDeterminant(minor,order-1);
            //Not including these 2 lines in the TI-BASIC version
            if( (i+j)%2 == 1)
                Y[i][j] = -Y[i][j];
        }
    }

4
TI Z80 / Re: zStart - an app that runs on ram clears
« on: August 18, 2011, 07:39:48 am »
There's a big bug with the Mathprint division thing, which most of the time crashes my calculator and some other times divide the screen into half, and the cursor blinks at the middle while everything else fill in the upper half of the screen. It's like you have Horiz on but worse. This bug only happens with Alpha F1, n/d, both in Mathrpint mode and in CLASSIC mode. Other Mathprint stuff is fine.

5
The Axe Parser Project / Re: MIDI To Axe Music Converter
« on: August 15, 2011, 03:53:17 am »
I'm able to convert the midi file into a 8xp but when I choose to send to device, destination says "Incompatible Type".

6
Axe / Re: Axe Q&A
« on: August 12, 2011, 07:04:25 pm »
This is probably very stupid to ask, but I find myself learning Axe very slowly. I read through the document and I read tutorials on Axe. But when I read codes from open source Axe programs, I have to spend a really long time to figure out what it does, most of the time, I can't figure out either. So I'd like to ask how you learned Axe at the beginning and how did you progress to this stage?

7
Axe / Re: Axe Q&A
« on: August 11, 2011, 04:27:31 am »
That's fantastic! Thanks Squidgetx!

8
Axe / Re: Axe Q&A
« on: August 10, 2011, 07:36:39 am »
Thank you Runner. Trace's working now. Is there a routine or axe's way to display and prompt user input at the same time like Prompt in BASIC? This is currently what I'm working on. like, how can I make the cursor blinks at the same time as user input and I'm finding out a way to delete number like in Prompt in BASIC.

Also, if you have the APP Finance that comes with the calculator, the screen has a list of variables and user can scroll up and down to input number. Can Axe do this?

Code: [Select]
Lbl 001
getKey->K

If K=15
.QUIT
Return
./QUIT
End

If K=33:N*10+0->NEnd
If K=34:N*10+1->NEnd
If K=26:N*10+2->NEnd
If K=18:N*10+3->NEnd
If K=35:N*10+4->NEnd
If K=27:N*10+5->NEnd
If K=19:N*10+6->NEnd
If K=36:N*10+7->NEnd
If K=28:N*10+8->NEnd
If K=20:N*10+9->NEnd
If N<10
Output(1,1,N>Dec)
Else
Return
End
Goto 001

EDIT: Just wondering, what is main buffer and back buffer?

9
Axe / Re: Axe Q&A
« on: August 06, 2011, 07:44:02 pm »
Umm, can I ask a question?

So, I'm trying to make a list of values, much of a Pascal triangle row. I'm expecting something similar to {1 5 10 10 5 1} like in TI-BASIC, or something that is workable with to get individual byte's value later on. I'm getting 34540 whenever I run the program.

EXC returns a factorial of a number. Each value in a pascal triangle row is found out by finding n!/(k!(n-k)!) where n is the nth row, in this case 5. k is from 1 to 5. First value in that row is 5, not 1. Because k cannot be 0, I declare L1 by starting with 1.

Code: [Select]
.PASCAL
ClrHome
sub(PAS,5)
Disp L1>Dec
Return

Lbl PAS
1->{L1}
1->C
For(J,1,r1
r1-J->B
sub(EXC,r1
A->C
sub(EXC,J
C/A->C
sub(EXC,B
C/A->C
C->{L1+J}
End
Return

Lbl EXC
1->A
For(I,1,r1
A*I->A
End
Return

EDIT: I just looked at Axe Q&A first page, and the first post says GDB cannot be modified. So I've modified the code above to see whether I can use free RAM, but I still get a number instead a range of numbers.

10
Axe / Re: Axe Q&A
« on: August 05, 2011, 10:06:55 am »
I don't think so because if I use
Code: [Select]
sub(EXC,3)
Disp A>Dec,i

I only get 1 display.

11
Axe / Re: Axe Q&A
« on: August 04, 2011, 05:53:54 am »
I found a way around using decimals numbers :D. thanks. I'm having a problem with calling sub functions. I'm using Ashbad's guide for Axe v0.5.3 because I've had problems of getting my RAM and Archive cleared when I used Axe v1.0.1. The problem I'm having with my program is that it display the value of C 6 times, even though I only ask for it thrice, and the value of C is even different from each other in every Disp call. the code is below:

Code: [Select]
.PAST

sub(PAS,5)

Lbl PAS
1->C
1->K
r1-K->B
sub(EXC,r1)
A->C
Disp C>Dec,i
sub(EXC,K)
C/A->C
Disp C>Dec,i
sub(EXC,B)
C/A->C
Disp C>Dec,i
Return

Lbl EXC
1->A
For(I,1,r1
A*I->A
End
Return

Display are as follow: 120, 120, 5, 24, 24, 4

EXC is used for factorials ! and PAS is to generate a binomial coefficient.

The value for C I expected is 5

12
Axe / Re: Axe Q&A
« on: August 03, 2011, 04:03:37 am »
Thank you! I read somewhere on the forum that Axe doesn't handle decimals numbers and it will be rounded automatically down and up. Is that right? Is there a routine or a way to store numbers such as 0.53?

13
Axe / Re: Axe Q&A
« on: July 27, 2011, 07:49:57 am »
I'm a bit confused about the number system. If a 1-byte number can have a range from 0 to 255, then why is it when I type 55 into notepad then look at it in a hex editor (HxD), I got 35 35? Isn't it supposed to be hold in one byte and not two bytes?

14
Axe / Re: Axe Q&A
« on: July 24, 2011, 09:48:41 pm »
I'm just trying to input a 3 byte number. And you're right. It turns out using length is unnecessary. :)
N is a 3 byte number, and I have to to limit user input to those 3 bytes. A increases at every getKey interval

Code: [Select]
.INPUT
Zeros(6)→N
0→A
"Input number:"→Str0
Disp Str0,i
sub(I)
If K=15
ClrHome
Return
End
If K=9
Disp N>Dec,i
End

Lbl I
getKeyüK
If K=36:7→{N+A}End
If K=36:7→{N+A}End
If K=35:4→{N+A}End
If K=34:1→{N+A}End
If K=28:8→{N+A}End
If K=27:5→{N+A}End
If K=26:2→{N+A}End
If K=20:9→{N+A}End
If K=19:6→{N+A}End
If K=18:3→{N+A}End
A++
ReturnIf K=15
ReturnIf length(N)=3
ReturnIf K=9
Disp N>Dec,i
Goto I

The code above doesn't work and it just display 40802 continuously for some reasons.

What is the difference between using Repeat getKey(15):End vs Lbl:Goto? Don't they do the same thing? Is there any benefits in using one and not the other? Also, is there any benefits if I learn TI-ASM then Axe language?

15
Axe / Re: Axe Q&A
« on: July 24, 2011, 08:33:15 am »
if I have an infinite loop in my application, is there a quit button like ON in Basic? and not having to take out the batteries?

Pages: [1] 2