フィルターのクリア

How can i group each column of a matrix after i split a matrix into columns.

2 ビュー (過去 30 日間)
Austin
Austin 2013 年 11 月 5 日
編集済み: Sean de Wolski 2013 年 11 月 5 日
for eg, i have a matrix "mat = 10*rand(x,y)"
after i split the matrix by columns into y number of groups,how can i group them in such a way that grp1=column1 of matrix mat, grp2=column2 of matrix mat and so on..... all the way until group y = column y of the matrix?

回答 (2 件)

Sean de Wolski
Sean de Wolski 2013 年 11 月 5 日
編集済み: Sean de Wolski 2013 年 11 月 5 日
I would avoid creating the groups like you're proposing ( FAQ) and instead continue to operate on the matrix as it is.
What is your end goal? Given:
mat = 10*rand(6,7)
What do you want to do with mat?
  3 件のコメント
Image Analyst
Image Analyst 2013 年 11 月 5 日
What do you have against max()???
Sean de Wolski
Sean de Wolski 2013 年 11 月 5 日
編集済み: Sean de Wolski 2013 年 11 月 5 日
How about
-min(-mat)
or
nanmax(mat)
?

サインインしてコメントする。


Azzi Abdelmalek
Azzi Abdelmalek 2013 年 11 月 5 日
mat=rand(x,y)
for k=1:size(mat,2)
c=mat(:,k) % your column k
% Do what you want
end

カテゴリ

Help Center および File ExchangeMultidimensional Arrays についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by