By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,190 Members | 1,653 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,190 IT Pros & Developers. It's quick & easy.

fragmenting a matrix in a no of variablle matrices having variable no of rows

P: 4
I have to devide a matrix in variable no of matrices with each having variable no of rows. Like I have to devide a matrix with dim.9X19 into say 4 matrices with row nos 1,6,6,6 respectively, and I have to use these matrices in furthur calculations.How can I proceed for this problem? Here array defining should also be dynamic and I am also facing problem in giving array[] names.I am using TC++ compiler.
If anyone has a moment to help me think out of the box, I would be most appreciative. Thanks all.
Jul 18 '07 #1
Share this Question
Share on Google+
2 Replies


weaknessforcats
Expert Mod 5K+
P: 9,197
A 9x19 array as 171 elements. A 1x6x6x6 has 216 elements.

How are you going to divide the 9x19 into a 1x6x6x6???

I can help you if the arrays are the same size.
Jul 18 '07 #2

Expert 10K+
P: 11,448
A 9x19 array as 171 elements. A 1x6x6x6 has 216 elements.

How are you going to divide the 9x19 into a 1x6x6x6???

I can help you if the arrays are the same size.
I think the OP wanted to say 19 rows by 9 columns; chop up the original matrix
in 6x9, 6x9, 6x9 and 1x9 sized 'sub' matrixes. (all on top of each other).

IMHO a 'MatrixView' class given the original matrix (and its dimensions) could
do the job (just overload the operator[]).

kind regards,

Jos
Jul 18 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.