Extracting columns from a matrix with a matrix
Afficher commentaires plus anciens
I have a matrix like that A=[0 3 0; 0 2 1]. I want to extract the information from a B matrice which has many columns. I want matrixes (in this case it is 2 matrixes) that will sum up the columns in the B matrix with respect to A matrix. For example, 1st matrix will be the summation of 0th 3rd and 0th column (of B matrix), 2nd matrix will be the summation of 0th 2rd 1st column (of B matrix). And i want to name these matrixec as X1 , X2 etc.. A matrix is just an example here, the matrix can differ in row and column size. How can i do this? Thank you.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Matrix Indexing dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!