필터 지우기
필터 지우기

Hi , i want to build a matrix

조회 수: 1 (최근 30일)
Husam
Husam 2022년 11월 21일
댓글: Husam 2022년 11월 21일
  댓글 수: 5
Jan
Jan 2022년 11월 21일
Fine. You do not expect that the members of the forum read this article to find out, what C, A, B and ny is, hopefully. This is your turn. So please explain the details. Post the current code and ask a specific question.
Husam
Husam 2022년 11월 21일
tanx

댓글을 달려면 로그인하십시오.

채택된 답변

David Hill
David Hill 2022년 11월 21일
C=rand(1,3);
B=rand(3,1);
A=rand(3,3);
n=size(A,1);
a=eye(n);
y=4;
H=diag(repelem(C*B,n*y));
for k=-1:-1:-n*y+1
a=a+A^-k;
H=H+diag(repelem(C*a*B,n*y+k),k);
end
H
H = 12×12
0.9203 0 0 0 0 0 0 0 0 0 0 0 1.7417 0.9203 0 0 0 0 0 0 0 0 0 0 2.7749 1.7417 0.9203 0 0 0 0 0 0 0 0 0 3.9719 2.7749 1.7417 0.9203 0 0 0 0 0 0 0 0 5.3924 3.9719 2.7749 1.7417 0.9203 0 0 0 0 0 0 0 7.0677 5.3924 3.9719 2.7749 1.7417 0.9203 0 0 0 0 0 0 9.0469 7.0677 5.3924 3.9719 2.7749 1.7417 0.9203 0 0 0 0 0 11.3838 9.0469 7.0677 5.3924 3.9719 2.7749 1.7417 0.9203 0 0 0 0 14.1437 11.3838 9.0469 7.0677 5.3924 3.9719 2.7749 1.7417 0.9203 0 0 0 17.4028 14.1437 11.3838 9.0469 7.0677 5.3924 3.9719 2.7749 1.7417 0.9203 0 0
  댓글 수: 1
Husam
Husam 2022년 11월 21일
thank u very much

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by