るりまサーチ (Ruby 2.2.0)

最速Rubyリファレンスマニュアル検索!
2件ヒット [1-2件を表示] (0.124秒)

別のキーワード

  1. matrix each
  2. matrix map
  3. matrix *
  4. matrix index
  5. matrix []

ライブラリ

クラス

検索結果

Matrix#vstack -> Matrix (105790.0)

行列 self と matrices を縦に並べた行列を生成します。

行列 self と matrices を縦に並べた行列を生成します。

Matrix.vstack(self, *matrices) と同じです。

//emlist[例][ruby]{
require 'matrix'
x = Matrix[[1, 2], [3, 4]]
y = Matrix[[5, 6], [7, 8]]
x.vstack(y) # => Matrix[[1, 2], [3, 4], [5, 6], [7, 8]]
//}

@see Matrix.vstack, Matrix#hstack

Matrix#hstack(*matrices) -> Matrix (51451.0)

行列 self と matrices を横に並べた行列を生成します。

行列 self と matrices を横に並べた行列を生成します。

Matrix.hstack(self, *matrices) と同じです。

//emlist[例][ruby]{
require 'matrix'
x = Matrix[[1, 2], [3, 4]]
y = Matrix[[5, 6], [7, 8]]
x.hstack(y) # => Matrix[[1, 2, 5, 6], [3, 4, 7, 8]]
//}

@param matrices 並べる行列。すべての行列の行数がselfの行数と一致していなければならない
@raise ExceptionForMatr...