Matrix names within a matrix
정보
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
이전 댓글 표시
So I have a piece of code that generates many matrices: mass, time, gravity, frontal_area etc.. I would like to create a matrix A = [mass; frontal_area] which only contains specific variables. Now if I wanted the value of mass I would type A(1,1) or something to that effect. HELP
댓글 수: 0
답변 (1개)
Azzi Abdelmalek
2014년 1월 10일
mass=[1 2;3 4]
front_area=[45 6 77]
A={mass;front_area}
Then type
A{1}
A{2}
댓글 수: 0
이 질문은 마감되었습니다.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!