Perl and Math::MatrixReal

D

dvdjimmy

Hello to everybody,

i am currently using the Math::MatrixReal package to work with
matrices.

I have a matrix with 9 columns and about 10000 rows.

I now want to calculate the difference between the numbers in (1,1) and
(2,1) and write that in (1,10). Is something like that possible for all
my 10000 rows?

As far as i have seen now, i can only put a pointer to a column and
after that can work with this column. But how about working with the
original data.

Like in Matlab, to just use Matrix(1,10)=Matrix(1,1)-Matrix(2,1).

Hope someone out there can help me with this.

best regards,

Joachim
 
A

Anno Siegel

dvdjimmy said:
Hello to everybody,

i am currently using the Math::MatrixReal package to work with
matrices.

I have a matrix with 9 columns and about 10000 rows.

I now want to calculate the difference between the numbers in (1,1) and
(2,1) and write that in (1,10). Is something like that possible for all
my 10000 rows?

As far as i have seen now, i can only put a pointer to a column and
after that can work with this column.

What makes you think that?
But how about working with the
original data.
Like in Matlab, to just use Matrix(1,10)=Matrix(1,1)-Matrix(2,1).

Have you read the documentation of the module you're using? Look up the
methods ->element and ->assign.

Anno
 
D

dvdjimmy

Thank you for your answer.

You are absolutely right. i did not read the documentation very
carefully. The mentioned methods are exactly what i am looking for.

Thanks a lot.

Best regards,

Joachim
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,021
Latest member
AkilahJaim

Latest Threads

Top