symFunType
説明
例
シンボリック関数または式
シンボリック関数および式の配列を作成します。
syms f(x)
expr = [f(x) sin(x) exp(x) int(f(x)) diff(f(x))]
expr =
各配列要素の関数型を決定します。
s = symFunType(expr)
s = 1x5 string
"f" "sin" "exp" "int" "diff"
シンボリック式の最上位の算術演算子
2 つのシンボリック式を作成します。式の最上位の算術演算子を決定します。
syms x
expr1 = x/(x^2+x+2);
expr2 = x + 1/(x^2+x+2);
s1 = symFunType(expr1)
s1 = "times"
s2 = symFunType(expr2)
s2 = "plus"
演算子で区切られる項を返すには、children
を使用します。
terms1 = children(expr1)
terms1=1×2 cell array
{[x]} {[1/(x^2 + x + 2)]}
terms2 = children(expr2)
terms2=1×2 cell array
{[x]} {[1/(x^2 + x + 2)]}
方程式および不等式の比較演算子
シンボリック方程式および不等式の配列を作成します。
syms x y eqns = [x+y==2, x<=5, y>3]
eqns =
各配列要素の最上位の比較演算子を決定します。
s = symFunType(eqns)
s = 1x3 string
"eq" "le" "lt"
入力引数
symObj
— シンボリック オブジェクト
シンボリック式 | シンボリック関数 | シンボリック変数 | シンボリック数 | シンボリック単位
シンボリック オブジェクト。シンボリック式、シンボリック関数、シンボリック変数、シンボリック数、またはシンボリック単位として指定します。
出力引数
s
— シンボリック関数型
string 配列
シンボリック関数型。string 配列として返されます。symObj
がシンボリック関数またはシンボリック式の場合、symFunType
は最上位関数名または symObj
の演算子を返します。次の表に、さまざまなシンボリック オブジェクトの出力値を示します。
シンボリック関数型 | 返される出力 | 入力の例 |
---|---|---|
シンボリック数学関数 | "sin" 、"exp" 、"fourier" など — シンボリック式の最上位のシンボリック数学関数の名前 | syms f(x); symFunType([sin(x), exp(x), fourier(f(x))]) |
未割り当てのシンボリック関数 |
| syms f(x) g(x); symFunType([f, g(x+2)]) |
算術演算子 |
|
|
方程式および不等式 |
|
|
論理演算子と論理定数 |
|
|
数値 |
|
|
定数 |
| symFunType(sym([pi catalan])) |
変数 |
| symFunType(sym(x)) |
単位 |
| symFunType(symunit('m')) |
サポートされていないシンボリック型 | "unsupported" |
バージョン履歴
R2019a で導入
MATLAB コマンド
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは MATLAB コマンドをサポートしていません。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)