showconstr
(非推奨) 最適化制約の表示
説明
例
最適化制約の表示
最適化制約の配列を表示します。
x = optimvar('x',3,2);
constr = sum(x,2) <= [1;3;2];
showconstr(constr)
(1, 1) x(1, 1) + x(1, 2) <= 1 (2, 1) x(2, 1) + x(2, 2) <= 3 (3, 1) x(3, 1) + x(3, 2) <= 2
入力引数
constr
— 最適化制約
OptimizationEquality
オブジェクト | OptimizationInequality
オブジェクト | OptimizationConstraint
オブジェクト
最適化制約。OptimizationEquality
オブジェクト、OptimizationInequality
オブジェクト、または OptimizationConstraint
オブジェクトとして指定します。constr
は単一の制約または制約の配列を表すことができます。
例: constr = x + y <= 1
は、x
と y
がスカラー変数の場合は単一の制約です。
例: constr = sum(x) == 1
は、x
が 2 次元以上の配列の場合は制約の配列です。
ヒント
大規模または複雑な制約の場合は、
writeconstr
を使用して制約情報を含むテキスト ファイルを生成します。
バージョン履歴
R2017b で導入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)