Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I access a row(or a column) of CNiMatrixT as a CNiVectorT?

I have a CNiMatrixT which stores my data. Each row, for example is for one channel. How can I access a row of CNiMatrixT as a CNiVectorT? or a column?

Thanks
0 Kudos
Message 1 of 2
(3,103 Views)
Zigzag,
In Measurement Studio 6.0, there are two functions that allow you to extract a particular row or column from a CNiMatrixT into a CNiVectorT: CopyRow(..) and CopyColumn(..)
If you are in a previous version, then you'll have to index every column of a given row in order to extract the whole row. So, in a for loop we'll have:

for (i=0; i < Columns; i++)
myvector[i] = mymatrix(theRow, i);

Hope this helps,

Azucena
National Instruments
Message 2 of 2
(3,103 Views)