ドキュメンテーション

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

プロパティと前提条件

変数または式が取り得る値の制限

メモ

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

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

MuPAD 関数

assumeSet permanent assumption
assumeAlsoAdd permanent assumption
assumingSet temporary assumption
assumingAlsoAdd temporary assumption
getpropQuery properties of expressions
isCheck a mathematical property of an expression
iszeroGeneric zero test
property::dependsDependence table with all properties of an expression
property::haspropDoes an object have properties?
property::showpropsWhat assumptions are made?
unassumeDelete the properties of an identifier

例および操作のヒント

Use Permanent Assumptions

Permanent assumptions work best for the mathematical properties that hold true throughout your computations. Suppose, you want to calculate the time during which a free-falling object drops from the height h. The kinematic equation for the free fall motion is h = g t2, where g is the free fall acceleration. Using this equation, calculate the time during which the object falls from a certain height. Without assumptions, you get the complete solution for all possible values of parameters including complex values:

Use Temporary Assumptions

Use temporary assumptions to specify that an object holds mathematical properties for a particular calculation. Temporary assumptions also help you narrow a general solution and get specific solutions. For example, the following equation describes linear motion with constant acceleration: . Here, r is the distance the object travels, r0 is the initial distance, v0 is the initial velocity, a is the constant acceleration, and t is the time of travel. If you know all other parameters and want to calculate the time that the object was moving, solve the equation for the variable t:

概念

Properties

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

When to Use Assumptions

By default, MuPAD assumes that all symbolic parameters and variables represent complex numbers. If you perform computations that involve unknowns with natural restrictions, you can set assumptions on these unknowns. For example, when solving an equation where one of the parameters represents real numbers, request the solver to consider this parameter as a real number. Use assumptions to limit the number of solutions to those necessary and to improve code performance.