[SciPy-user] concatenation of arrays woes !!
Karthikesh Raju
karthik at james.hut.fi
Tue May 4 04:10:53 EDT 2004
Hi All,
is it possible to concatenate arrays along the column,
A[:,1:5] = concatenate(a,b,c)
a is 2x1, b 2x1, c 1x1
i have been trying to convert the following matlab code and this is my
stumbling block for several months :(
K = 3
CL = 5
L = 2
d -- (K,L) in the range (0,CL)
codes -- (K,CL)
window = 1
s = codes'
output S -(CL*window,K*L*(window+1)) matrix
for k = 1:K
for l = 1:L
S(:,1+(window+1)*(l-1)+(window+1)*L*(k-1)) =
[s(CL-d(k,l)+1:CL,k); zeros(CL*(window-1),1);zeros(CL-d(k,l),1)]
S(:,(window+1)*1+(window+1)*L*(k-1)) =
[zeros(d(k,l),1);zeros(CL*(window-1),1);s(1:CL-d(k,l),k)]
for n=2:window
S(:,n+(window+1)*(l-1)+(numbits+1)*L*(k-1)) =
[zeros(d(k,l),1); zeros(CL*(n-2),1);
s(:,k);zeros((window-n)*CL+CL-d(k,l),1)]
end
end
end
--------------------
This module has been my stumbling block for the last 2 months, had no
problems with matlab, here i have all kinds of concatination woes. Please
give me pointers on how to achieve such concatenations,
thanks a lot
regards
karthik
-----------------------------------------------------------------------
Karthikesh Raju, email: karthik at james.hut.fi
Researcher, http://www.cis.hut.fi/karthik
Helsinki University of Technology, Tel: +358-9-451 5389
Laboratory of Comp. & Info. Sc., Fax: +358-9-451 3277
Department of Computer Sc.,
P.O Box 5400, FIN 02015 HUT,
Espoo, FINLAND
-----------------------------------------------------------------------
More information about the SciPy-User
mailing list