필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

How can I create this matrix?

조회 수: 2 (최근 30일)
ghazwan alsoufi
ghazwan alsoufi 2014년 12월 11일
마감: MATLAB Answer Bot 2021년 8월 20일
I would like to create a matrix in Matlab. I have variable Y(i,j,k) where
i=0,1,2,...,v j=1,2,...,v+1 and q=1,2,...,Q
also
i~=j (i not equal j)
for example when v=2 and q=2 the matrix will be
[1 1 0 0 0 0 1 1 0 0 0 0;
0 0 1 1 1 1 0 0 0 0 0 0 ]
when v=2 and q=3 the matrix will be
[1 1 1 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0;
0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0]
when v=3 and q=2 the matrix will be
[1 1 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0;
0 0 1 1 0 0 1 1 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0;
0 0 0 0 1 1 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0]
Note that the size of matrix is (v,2*(q*v)+q*(v*(v-1))). Can you help me please to create this matrix for any number of v and q?
Regards,
Ghazwan.
  댓글 수: 2
Image Analyst
Image Analyst 2014년 12월 11일
In "variable Y(i,j,k)" where is q? And in your examples, you show 2D matrices, yet Y is a 3D array. What matrix are you showing?
Guillaume
Guillaume 2014년 12월 11일
It's certainly very unclear how the matrices are generated. v appear to be the number of rows and q the number of repeated columns. How the 1 appear in there and what i, j, k have to do with it is not explained.

답변 (0개)

이 질문은 마감되었습니다.

태그

아직 태그를 입력하지 않았습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by