How to select vectors from a set of vectors
    5 ビュー (過去 30 日間)
  
       古いコメントを表示
    
Hello all, Suppose I have a set of vectors  where
where 
 where
where 
My query is how can we select any vector from set 𝒥and form a matrix of dimension 5 by 500, where 5 corresponds to dimesion of  such that n is from 1 to 8 and 500 corresponds to 500
 such that n is from 1 to 8 and 500 corresponds to 500  's.
's.
 such that n is from 1 to 8 and 500 corresponds to 500
 such that n is from 1 to 8 and 500 corresponds to 500  's.
's.Any help in this regard will be highly appreciated.
2 件のコメント
  Jan
      
      
 2023 年 3 月 15 日
				Your x[n] have the dimension 5. You have 8 of them. Therefore I'm confused by your 8 and 500.
What is the purpose to select "any vector"? Do you ask for the vertcat command?
If the x[n] are binary vectors, 500 of them with 8 elements cannot be unique: 2^8=256.
採用された回答
  David Hill
      
      
 2023 年 3 月 15 日
        x=[1 1 1 1 0 0 0 0;1 0 0 0 1 1 1 0;0 1 0 0 1 0 0 1;0 0 1 0 0 1 0 1;0 0 0 1 0 0 1 0];
r=randi(8,1,500);
y=x(:,r)
その他の回答 (0 件)
参考
カテゴリ
				Help Center および File Exchange で Creating and Concatenating Matrices についてさらに検索
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


