I have a loop that generates a new matrix with each iteration. How do I store the matrix for each iteration?

조회 수: 2 (최근 30일)
I am coding a program that allows a user to unput the values that they have for any 1D truss problem. It will then solve the problem using finite element analysis. I need to use the values that the user gives and calculate the local stiffness matrix for each element, and then I need to assemble the local matrices into a global stiffness matrix. I have been able to get my program to find the local stiffness matrix for each element, however, I cannot figure out how to store this matrix for each element. For example, I want to store these matrices as KE(i), where i denotes the local stiffness matrix for the ith element. However, my code reads this as though I am wondering what the ith value of the matrix is instead. How can I tell it to use the ith matrix, and not the ith value in the matrix?

채택된 답변

Stephen23
Stephen23 2020년 11월 30일

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Matrix Indexing에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by