フィルターのクリア

if i have matrix and i want to generate a random matrix with specific rule ?

3 ビュー (過去 30 日間)
Firas Al-Kharabsheh
Firas Al-Kharabsheh 2016 年 5 月 3 日
if i have this matrix
Full_Matrix = [ 1 1 0 1 0 1
0 0 0 0 0 0
0 1 0 0 0 0
0 1 0 0 0 0
1 1 0 1 1 1]
and i want to generate a random matrix X with the same size of Full_matrix and after that
i want to copy the row and column in Full_Matrix that have ones like
[ 1 1 0 1 0 1 ]
[ 1 1 0 1 1 1 ]
and the column [ 1
0
1
1
1 ]
and put them in the same position in the new matrix like that
if
X = [ 1 0 1 0 0 1
0 0 1 0 1 0
1 0 1 0 0 1
1 1 1 0 0 1
0 1 1 0 1 0 ]
and after copying from Full_Matrix the X matrix will be like that
X = [ 1 1 0 1 0 1
0 0 1 0 1 0
1 1 1 0 0 1
1 1 1 0 0 1
1 1 0 1 1 1 ]
  • i want a function to do this operation because the Full_Matrix will be change

回答 (0 件)

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by