SCIRun User Mailing List

## [SCIRUN-USERS] Re: matrix left division

• From: Burak Erem <berem@ece.neu.edu>
• To: Petr Stovicek <pstov@lf1.cuni.cz>
• Cc: scirun-users <scirun-users@sci.utah.edu>
• Subject: [SCIRUN-USERS] Re: matrix left division
• Date: Mon, 11 Jan 2010 11:24:46 -0500

Hi Petr,

If I understand your problem correctly, given y and A, you want the least squares solution x to:
y=Ax

However, in your problem the variables y and x are not column vectors, correct? As I understand it, they are matrices that are not necessarily square? If so, you can solve this problem one column at a time if, for example, the network you're building is analyzing/visualizing one column at a time. You can take a look at the example network here:
src/Packages/BioPSE/nets/Samples/tikhonov-inversion.srn
to see how you can do things one column at a time, if necessary.

In general, if I'm not mistaken, you're working on finding inverse solutions to ECG? I'm working on my PhD under SCI and primarily contribute code to SCIRun for forward/inverse ECG. I debugged some examples you had sent Rob fairly recently. I'd be interested in finding out more about what you're doing and if you'd like to discuss this we can continue this part of the conversation off of the scirun-users list.

Thanks,
Burak

On Fri, Jan 8, 2010 at 4:29 AM, Petr Stovicek wrote:
Hello,

has anyone tried to do matrix division with the EvaluateLinAlgGeneral
module?

According to the documentation, it is programmed to handle matrix addition
and multiplication.
Specifically, I would need to do matrix left division (least squares
solution) with matrices that are neither square nor column vectors, just
have the same number of rows.
Do we have to write our own C code to perform this in SCIRun? I know I can
do it in Matlab, but am trying to avoid transferring data between the two
software.

Thanks

Petr Stovicek
Charles University