|
Ublas : |
From: Gunter Winkler (guwi17_at_[hidden])
Date: 2005-07-13 14:24:44
Am Mittwoch, 13. Juli 2005 19:35 schrieb Eddie Vedder:
> Dear list,
>
> I try to copy some submatrices into one larger matrix (a so called
> block matrix).
> In Matlab the code would look like:
>
> N_TOP = [N_TOPLEFT;N_BOTTOMLEFT];
> N_BOTTOM = [N_TOPRIGHT;N_BOTTOMRIGHT];
> H_TOTAL = [N_TOP N_BOTTOM];
>
> ... where, e.g., TOPLEFT means the submatrix in the upper left part
> of the target block matrix H_TOTAL.
>
> How can I do this with uBlas? I only found the function "project",
> which extracts a submatrix from the larger matrix, but not the vice
> versa method.
You can use project as an lvalue, too:
project(A, range(a,b), range(c,d)) = other_matrix
mfg
Gunter