ドキュメンテーション

最新のリリースでは、このページがまだ翻訳されていません。 このページの最新版は英語でご覧になれます。

行列とベクトルの構築

行列、配列、ベクトル、特殊行列

メモ

MuPAD® Notebook は将来のリリースでは削除される予定です。代わりに MATLAB® ライブ スクリプトを使用してください。

MuPAD Notebook ファイルを MATLAB ライブ スクリプト ファイルに変換するには、convertMuPADNotebook を参照してください。MATLAB ライブ スクリプトは、多少の違いはありますが、MuPAD 機能の大半をサポートします。詳細は、MuPAD Notebook を MATLAB ライブ スクリプトに変換を参照してください。

MuPAD 関数

arrayCreate an array
bernsteinBernstein polynomials
bernsteinMatrixBernstein matrix
densematrixCreate a matrix or a vector
doprintPrint large matrices
hfarrayCreate an array of hardware floating-point values
matrixCreate a matrix or a vector
hessianHessian matrix of a scalar function
jacobianJacobian matrix of a vector function
linalg::hessenbergHessenberg matrix
linalg::hilbertHilbert matrix
linalg::invhilbertInverse of a Hilbert matrix
linalg::invpascalInverse of a Pascal matrix
linalg::pascalPascal matrix
linalg::randomMatrixGenerate a random matrix
linalg::toeplitzToeplitz matrix
linalg::vandermondeVandermonde matrix
linalg::invvandermondeVandermonde matrices and their inverses
linalg::wiedemannSolving linear systems by Wiedemann's algorithm

例および操作のヒント

Create Matrices

MuPAD supports creating and operating on vectors and multidimensional matrices. Vectors and matrices in MuPAD can contain arbitrary MuPAD objects: numbers, variables, arithmetical expressions, and so on. The simplest way to create a matrix is to use the matrix command:

Create Vectors

Vectors in MuPAD do not form a separate data type. As matrices, vectors belong to the type Dom::Matrix(). To create a row or a column vector, use the matrix command and specify one of the dimensions to be 1. For example, create a row vector that contains five elements:

Create Special Matrices

MuPAD provides functions for creating special types of matrices such as identity, diagonal, Hilbert, Toeplitz, and other matrices. For example, create the 3×3 identity matrix:

Access and Modify Matrix Elements

MuPAD lets you access and change each individual element of a vector or a matrix. For example, create the 3 ×4 matrix of zeros:

Create Matrices over Particular Rings

The matrix command creates a matrix over Dom::ExpressionField(). The components of such matrices can be arbitrary arithmetical expressions. Alternatively, you can create your own matrix constructor and use it to create matrices with elements in a particular ring. When operating on such matrices, most of the MuPAD functions perform computations over the specified ring. One exception is the numeric library functions. The call Dom::Matrix(R) creates the constructor for matrices of arbitrary dimensions with the elements in the ring R. To specify the ring R, you can use the predefined rings and fields such as Dom::Integer or Dom::IntegerMod(n) or others from the Dom library. For example, define the constructor that creates matrices over the ring of integer numbers:

概念

Use Sparse and Dense Matrices

When you use matrices in MuPAD computations, both computational efficiency and memory use can depend on whether the matrix is sparse or dense. Sparse matrices contain a large number of zero-valued elements. The internal storage of matrices in MuPAD is optimized for sparse data. MuPAD saves the nonzero elements and their indices. When you use sparse matrices, MuPAD assumes that all unspecified elements are zeros. When operating on large sparse matrices, consider the following methods for better performance:

Linear Algebra Library

Use only in the MuPAD Notebook Interface. This functionality does not run in MATLAB.