help-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-gsl] Matrix Concatenation


From: James Bergstra
Subject: Re: [Help-gsl] Matrix Concatenation
Date: Mon, 15 Aug 2005 12:24:02 -0400
User-agent: Mutt/1.4.1i

Can you accomplish your goal with something like this:

///////////
// Concatenate B after A, store the result in C
//

gsl_matrix * A = gsl_matrix_alloc( a1, size2 )
gsl_matrix * B = gsl_matrix_alloc( b1, size2 )
gsl_matrix * C = gsl_matrix_alloc( a1 + b1, size2 );

gsl_matrix_view aview = gsl_matrix_submatrix( C, 0, 0, a1, size2 );
gsl_matrix_view bview = gsl_matrix_submatrix( C, a1, 0, b1, size2 );

gsl_matrix_memcpy( &aview.matrix, A);
gsl_matrix_memcpy( &bview.matrix, B);

///////////

James

On Sun, Aug 14, 2005 at 05:48:52PM -0700, Srikant wrote:
> Hi All,
> 
> I have searched the GSL docs, google and the help
> archives but did not come across any function that
> implements Matrix concatenation. 
> 
> Is there a undocumented function that performs
> horizontal and vertical matrix concatenation?
> 
> Thanks all for your help,
> Srikant
> 
> 
>               
> __________________________________ 
> Yahoo! Mail for Mobile 
> Take Yahoo! Mail with you! Check email on your mobile phone. 
> http://mobile.yahoo.com/learn/mail 
> 
> 
> _______________________________________________
> Help-gsl mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/help-gsl

-- 
james bergstra
http://www-etud.iro.umontreal.ca/~bergstrj





reply via email to

[Prev in Thread] Current Thread [Next in Thread]