Jump to content



Photo
- - - - -

How Store Matrix Size Into A Variabe


Best Answer Sheepolution , 08 November 2014 - 12:45 AM

Ooooh, sorry I completely misunderstood your question.

 

Okay so what you can do is this:

 

Mat->List(A,1)->List 1

Dim List 1 -> N

 

So you assign the first column to List 1, and then read the length of that list.

It's a pretty lame solution, but it works :P

Go to the full post


  • Please log in to reply
5 replies to this topic

#1 jasonphan

jasonphan

    Newbie

  • Members
  • Pip
  • 8 posts

  • Calculators:
    fx-9750Gii

Posted 07 November 2014 - 05:49 PM

Lets say I have a Matrix A of size (4x6), I want to store the 4 into N, but I don't know how to read one dimension alone. 

 

I have tried Dim Mat A{1,1} -> N, but it appears that the output of Dim Mat is not a matrix so I cannot store [1,1] into a variable.

 

Can anyone help?



#2 Sheepolution

Sheepolution

    Newbie

  • Members
  • Pip
  • 21 posts
  • Gender:Male
  • Location:The Netherlands

  • Calculators:
    CFX-9850GC PLUS

Posted 07 November 2014 - 05:59 PM

Mat A[1,1]->N

 

Note that you use it like this:

 

Mat A[y,x]->N

 

First you choose the row, than you choose the column.

 

 

Just like how doing this: [[1,1,1,1],[1,1,1,1]] -> Mat A

Will get you  this:

 

        1       2       3       4

    _________________

1 |    1       1       1       1

2 |    1       1       1       1


Edited by Sheepolution, 07 November 2014 - 06:06 PM.


#3 jasonphan

jasonphan

    Newbie

  • Members
  • Pip
  • 8 posts

  • Calculators:
    fx-9750Gii

Posted 07 November 2014 - 06:04 PM

Hey, I want the row size to be store into the variable, not the value of Mat A[1,1] 



#4 jasonphan

jasonphan

    Newbie

  • Members
  • Pip
  • 8 posts

  • Calculators:
    fx-9750Gii

Posted 07 November 2014 - 06:34 PM

        1       2       3       4

    _________________

1 |    1       1       1       1

2 |    1       1       1       1

I know what you mean, but I want the total number of rows "2" to be stored.

What I am trying to do is that when I have multiple matrices pre-entered, I want to do calculations based on how many rows there are, so I am trying to determine the "y" input without actually inputting it again



#5 Sheepolution

Sheepolution

    Newbie

  • Members
  • Pip
  • 21 posts
  • Gender:Male
  • Location:The Netherlands

  • Calculators:
    CFX-9850GC PLUS

Posted 08 November 2014 - 12:45 AM   Best Answer

Ooooh, sorry I completely misunderstood your question.

 

Okay so what you can do is this:

 

Mat->List(A,1)->List 1

Dim List 1 -> N

 

So you assign the first column to List 1, and then read the length of that list.

It's a pretty lame solution, but it works :P


  • Ata.H.D likes this

#6 jasonphan

jasonphan

    Newbie

  • Members
  • Pip
  • 8 posts

  • Calculators:
    fx-9750Gii

Posted 09 November 2014 - 02:44 AM

Thank you Sheepolution, you are awesome  :rolleyes:






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users