Creating 100x1 vector in matlab for TDMA Method
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi, the code I have so far is attached, the professor wants us to use the TDMA method to solve for 100 unknowns. I was able to use the diag function to create the 100x100 matrix but I am unsure of how to create the 100x1 vectors for the variables X1-X100 and for the repeating values of "2.5,2,1.5,1 etc". Help would be greatly appreciated! Very new to coding and the textbook offfers practically no guidance.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/274293/image.jpeg)
댓글 수: 0
채택된 답변
James Tursa
2020년 2월 29일
편집: James Tursa
2020년 2월 29일
A = what you have already constructed
d = repmat([2.5;2.0;1.5;1.0],25,1);
Then code up your TDMA.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Dynamic System Models에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!