How to arrange local stiffness matrix to global stiffness matrix
32 ビュー (過去 30 日間)
古いコメントを表示
I have 3 local stiffness matrix 4 by 4;
local stiffness matrix-1 (4x4) = row and column address for global stiffness are 1 2 3 4 and 1 2 3 4 resp.;
local stiffness matrix-2 (4x4) = row and column address for global stiffness are 1 2 5 6 and 1 2 5 6 resp.;
local stiffness matrix-3 (4x4) = row and column address for global stiffness are 1 2 7 8 and 1 2 7 8 resp.;
I want these local stiffness matrices to be arranged in global stiffness matrix of (8x8) size according to above local stiffness address with overlapping cells added.
IMAGE HAS BEEN ATTACHED TO UNDERSTAND IT CLEARLY
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/156829/image.jpeg)
0 件のコメント
回答 (1 件)
Giovanni Mottola
2016 年 10 月 5 日
I strongly suspect there is something wrong with your scheme in the image attached. The stiffness matrix #2 (marked in red), for instance, has 4x4=16 elements, but you've marked only 8 of them in the global matrix. If I understand correctly the problem you are facing (2D beam stiffness matrices?) then perhaps this should help:
mat_stiff_global=zeros(8, 8);
mat_stiff_global(1:4, 1:4)=mat_stiff_global(1:4, 1:4)+mat_stiff_local1;
mat_stiff_global([1:2, 5:6], [1:2, 5:6])=mat_stiff_global([1:2, 5:6], [1:2, 5:6])+mat_stiff_local2;
mat_stiff_global([1:2, 7:8], [1:2, 7:8])=mat_stiff_global([1:2, 7:8], [1:2, 7:8])+mat_stiff_local3;
1 件のコメント
Jose Carmona
2018 年 2 月 13 日
Thank you so much for answering this guys question. I am currently in advanced machine analysis and I didn't want to have to type out each matrix, or variables to actually form the matrix.
参考
カテゴリ
Help Center および File Exchange で Resizing and Reshaping Matrices についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!