Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私は次元mx2のこの行列を持っています。必要なのは、mx1行列の各要素がmx2行列の各1x2行から最大値として取得されるようなmx1行列です。私は知っている反復で行うことができますが、直接的な方法はありますか?
はい、直接できます。matlabのmax関数を使用すると、最大値を取得する次元を指定できます。
max
max(data_m_by_two, [], 2)
必要なものが得られるはずです。2そこには、列の上にある行列の2番目の次元で最大値を取得したいと言っています。
2