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 CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by