hi, any tips for mapping 3 nos. of 4x4 matrix (k1, k2, k3) and i need to map it into 8x8 matrix (Kg) and their intersection should add up...
2 views (last 30 days)
Show older comments
Federico III
on 16 Mar 2025
Commented: Federico III
on 17 Mar 2025

2 Comments
Image Analyst
on 16 Mar 2025
What is your definition of "intersection"? What do the red numbers above the columns and beside the rows mean? Do you have vectors containing those red numbers? What would they be used for? And, you forgot to give the final result kg that you are wanting. Please do so.
If you have any more questions, then attach your data and code to read it in with the paperclip icon after you read this:
TUTORIAL: How to ask a question (on Answers) and get a fast answer Make it easy for us to help you, not hard.
dpb
on 16 Mar 2025
Edited: dpb
on 16 Mar 2025
Use the title for a short title, don't try to ask the question there...there's a whole area available for that so don't have to be overly terse.
Besides answering the "what do I mean/want?" questions posed by IA, attach the data as a .mat file containing the arrays or at least as pastable text...
Accepted Answer
Walter Roberson
on 16 Mar 2025
Kg = zeros(8,8);
Kg([3 4 1 2], [3 4 1 2]) = K1;
Kg([1 2 5 6], [1 2 5 6]) = Kg([1 2 5 6], [1 2 5 6]) + K2;
Kg([7 8 1 2], [7 8 1 2]) = kg([7 8 1 2], [7 8 1 2]) + K3;
More Answers (0)
See Also
Categories
Find more on Creating and Concatenating Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!