
Help On Shifting Matrix Rows/columns
#1
Posted 19 June 2008 - 05:17 PM
I am currently using a matrix to store the test results. Each time a new set of test results is entered, I need to shift all of the existing data over one place. Right now I am useing two For...Next loops to shift the data. However this is rather slow. I have not been able to find any built in command to perform a similiar operation. Does anyone here have any suggestions?
#2
Posted 20 June 2008 - 03:28 AM
I don't know how to move the data over one column in a matrix, however, if you stored your data into lists, it's very easy to move them such as List1
![[->]](/dot/public/style_emoticons/default/arrow.jpg)
#3
Posted 25 July 2008 - 03:02 PM
Also don't forget to check all the transform tools available (augment, transpose and so on).
#4
Posted 25 July 2008 - 05:42 PM
#5
Posted 09 September 2008 - 01:12 PM
I came up with the idea to use the list as a circular queue.
You could probably use a circular matrix.
Here is a link with explanation. (Seems like I wasn't the first one who came up with this idea)
http://en.wikipedia....Circular_buffer
#6
Posted 16 September 2008 - 03:10 PM
I am interested in graphing the test results, however I have not found any automatic method of graphing either list or matrix data. Is there a way to graph a list? The built in list to graph just uses the list as a series of coefficients for the x variable.
#7
Posted 17 September 2008 - 01:27 PM
What do you mean by deleting a row or column?I had thought about augment for adding to the matrix. But that just adds to the matrix. I have not found any way via the program to delete a row or column of a matrix. Some more information: the matrix is 10 by 30. There are ten possible test results that can be stored. I also thought of lists, but because a file can only hold six lists, I would have to use two files complicating programming.
You cannot resize a matrix without deleting it if that's what you mean>
Read the manual. If there is no built0in way, then just use a for loop. Use lines to connect the points.I am interested in graphing the test results, however I have not found any automatic method of graphing either list or matrix data. Is there a way to graph a list? The built in list to graph just uses the list as a series of coefficients for the x variable.
#8
Posted 16 April 2009 - 05:29 PM
I am looking around posts that i have not seen yet, and i see this problem
2008... but...
we could do this with little code i have do this in my fx9860g.
1- traspose mat A Â // change row with column
2- swap rows one by one
3- traspose it agane
Example code:
[codebox]
Dim Mat A    // put  Mat A Dimentions in List Ans
List Ans ->N Â Â // Put number of columens in N
Trn Mat A->Mat A Â Â // change columns with rows
For 1->C To (N-1)
Swap Mat A,C,C+1 Â
Next
Trn Mat A-> Mat A
[/codebox]
Note:
1- this code shifts column 1 to 2, 2 to 3, 3 to 4,... at the end the first column has been moved to end column so you can put new valus to end column
2- look at transpose operation!!! if you dont put the result in mat A the result go in Ans mat and the swap operation dont return right mat.(it swaps the rows ensted at the end) ( this was my problem too)
Edited by Babak, 16 April 2009 - 05:30 PM.
#9
Guest_gsh_*
Posted 22 April 2009 - 12:14 PM
One small correction: the Swap line should be
Swap A,C,C+1
#10
Posted 22 April 2009 - 01:46 PM

you are right!!!
I love Matrises, and solving my problems with them!! they are very powerfull beings!!
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users