Make a larger matrix from smaller ones
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
what I am trying to do in matlab is making a matrix from 2 smaller ones in a specific order
consider we have 2 matrices 2*2 called A and B. where k1 and k2 are constants
k1 = 50 k2 = 100
A = [k1 -k1; -k1 k1] B = [k2 -k2; -k2 k2]
now i want it to look like this in a larger matrix
C = [k1 -k1 0; -k1 k1+k2 -k2;0 -k2 k2]
is this possiple to do in matlab? this is just an simple example but i genarelly works with much larger matrixes with the same order.
thanks in advance :-)
6 commentaires
David Goodmanson
le 11 Mar 2017
Hi Ahmad, If you are saying that this website is not interested in this kind of problem, then that is not true. The initial comments above were about understanding the nature of the problem, not with the problem itself. People get assistance on indexing problems similar to this all the time. The only consideration is that the person asking the question has defined the issue, made an effort to solve it, and usually has supplied some code that does not work yet.
Réponses (0)
Voir également
Catégories
En savoir plus sur Matrix Indexing dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!