assemble global stiffness matrix

2 ビュー (過去 30 日間)
Abnan Ihwanto
Abnan Ihwanto 2018 年 11 月 25 日
コメント済み: Abnan Ihwanto 2018 年 11 月 25 日
I am trying to assemble a matrix in which I would like to put small matrices into a big one but I don't know how to do that,
I know that I have to define the big matrix first and then show put the small ones inside
for example I have k1=[1 -1; -1 1] , K2=[1 -1; -1 1] and the define bigK in which bigK=zeros(5,5) and in the end I want it to be like bigK = [ 1 0 -1 0 0; -1 0 1 0 0; 0 0 0 0 0; 0 0 0 0 0; 0 0 0 0 0]
in which the small matrices will assemble in diagonal way
how I can do it using a for loop ?

採用された回答

madhan ravi
madhan ravi 2018 年 11 月 25 日
result=blkdiag(k1,K2)
  1 件のコメント
Abnan Ihwanto
Abnan Ihwanto 2018 年 11 月 25 日
its not the answer, isn't?

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by