Jump to content



Photo
- - - - -

Creating random matrices, &other complaints


  • Please log in to reply
3 replies to this topic

#1 XYZ

XYZ

    Casio Fan

  • Members
  • PipPip
  • 46 posts
  • Location:Auckland, NZ
  • Interests:Lying on the beach on a hot sunny day

  • Calculators:
    Casio AFX2.0+, CFX9850, HP49G, fx-7700GB, TI-85, TI-92, HP20S scientific....

Posted 16 April 2003 - 07:55 PM

Well after pouring over the manual of my new afx and looking through the catalogue I still haven't been able to create a random matrix without doing lots of mucking around first.

There's a fill command, but that fills with a single number. What I had to do in the end was first create a random list seq(Ran#,X,0,8,1)->List 1
And then do this operation 9 times (I want a 9x9 matrix), and then I wrote a program (just as easy to do it in Run-Mat) List->Mat(List1,....,List9)
It worked, but man talk about a roundabout way of doing things.
And what really frustrated me was that I should have been able to do this:


For n,1,9,1
seq(Ran#,X,0,8,1)->List n

But the 'store to list' operator only accepts _numbers_ as arguments!!!!
Please let me know if there is a better way to go about what I'm trying to achieve. :(

Thus far, I am not impressed with Casio's lax program design. Their CAS is several steps behind the TI-92 (this was released 8 years ago!) and you can't even use the algebra or calculus commands in programs! :wacko:
Here in NZ, there isn't a great deal of difference in price between afx and TI-92 so I can see why higher-end users go for high end TI's and HP's.

BUT, I would like to congratulate Casio on a great design of hardware, the AFX itself is fantastic!! I am still glad I have one because the amount of good ad-ins available which run really nicely (not to mention its PC-near-conpatiblity meaning easyer development) mean I will never again be bored stiff in a mechanical engineering lecture. Here's to gaming on the afx!!! :beer:

#2 BiTwhise

BiTwhise

    Casio Overgod

  • [Legends]
  • PipPipPipPipPipPipPip
  • 627 posts
  • Gender:Male
  • Location:Guildford, Surry, UK
  • Interests:Programming, games, consoles, martial arts

  • Calculators:
    FX9700WE, CFX9970G, AFX2.0, Classpad 300

Posted 16 April 2003 - 08:04 PM

you can take use of the augment function

algorithm:

generate list
convert list to matrix // main matrix

for as many extra collumns as you like, do this:
generate list
convert to matrix // temp matrix (maybe mat ans is ok)
augment matrix to main matrix
loop

#3 CrimsonCasio

CrimsonCasio

    UCF Ambassador

  • [Legends]
  • PipPipPipPipPipPipPipPipPipPip
  • 3579 posts
  • Gender:Male
  • Location:USA
  • Interests:Claculators, Stephen King, Video Games, Calculators, Programming, Calculators, Reading, Calculators... hmm, what else... Ah! Calculators!

  • Calculators:
    Algebra FX2.0, CFX 9850Ga+, Classpad 300

Posted 16 April 2003 - 08:06 PM

you should just be able to do

{9,9}->Dim Mat A
for 1->A to 9
for 1->B to 9
Rand# ->Mat A[B,A]
next
next

#4 BiTwhise

BiTwhise

    Casio Overgod

  • [Legends]
  • PipPipPipPipPipPipPip
  • 627 posts
  • Gender:Male
  • Location:Guildford, Surry, UK
  • Interests:Programming, games, consoles, martial arts

  • Calculators:
    FX9700WE, CFX9970G, AFX2.0, Classpad 300

Posted 16 April 2003 - 08:15 PM

ye, but that's a bit slow

here's a basic program to do the job
"Row"?->R
"Col"?->C
Seq(Ran# ,X,1,R,1)
List->Mat(List Ans)->Mat A
For 1->A To C-1
Seq(Ran# ,X,1,R,1)
List->Mat(List Ans)
Augment(Mat Ans,Mat A)->Mat A
Next

if you're generating big matrixes, it might be an idea to check if C > R, in which case you swap them and Trn your matrix in the end (to cut down the number of loops as much as possible.. Seq is faster) :)


-- EDIT --
As for your complaints.. I totally agree
The CAS is limited, and poorly integrated
TI and HP are more advanced calculators
Casio is (here) cheaper, and offer ease of use, and PC-like programming :)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users