mpower, ^
固定小数点行列のべき乗 (^)
説明
例
行列の二乗
2 次元正方行列の指数値 0、1、2、3 のべき乗を計算します。
x = fi([0 1; 2 4], 1, 32); px0 = x^0
px0 = 1 0 0 1 DataTypeMode: Fixed-point: binary point scaling Signedness: Unsigned WordLength: 1 FractionLength: 0
px1 = x^1
px1 = 0 1 2 4 DataTypeMode: Fixed-point: binary point scaling Signedness: Signed WordLength: 32 FractionLength: 28
px2 = x^2
px2 = 2 4 8 18 DataTypeMode: Fixed-point: binary point scaling Signedness: Signed WordLength: 65 FractionLength: 56
px3 = x^3
px3 = 8 18 36 80 DataTypeMode: Fixed-point: binary point scaling Signedness: Signed WordLength: 98 FractionLength: 84
入力引数
A
— ベース
スカラー | 行列
基数。スカラーまたは行列として指定します。
例: x = fi([0 1; 2 4],1,32);
データ型: fi
複素数のサポート: あり
k
— 指数
正の実数値の整数
指数。実数値の整数として指定します。
データ型: single
| double
| int8
| int16
| int32
| int64
| uint8
| uint16
| uint32
| uint64
| fi
拡張機能
C/C++ コード生成
MATLAB® Coder™ を使用して C および C++ コードを生成します。
使用に関するメモと制限:
指数
k
が変数で入力がスカラーである場合、制御側fimath
のProductMode
プロパティはSpecifyPrecision
でなければなりません。指数
k
が変数で入力がスカラーでない場合、制御側fimath
のSumMode
プロパティはSpecifyPrecision
でなければなりません。制御側
fimath
のSumMode
プロパティがSpecifyPrecision
またはKeep LSB
に設定されている場合のみ、可変サイズ入力がサポートされています。可変サイズ信号では、生成されるコードと MATLAB® で結果が異なる場合があります。
生成コードでは、可変サイズ信号に対する出力は、制御側
fimath
のSumMode
プロパティを使用して計算されます。MATLAB では、可変サイズ信号に対する出力は、最初の入力
A
が非スカラーの場合、制御側fimath
のSumMode
プロパティを使用して計算されます。しかし、A
がスカラーの場合、MATLAB は制御側fimath
のProductMode
を使用して出力を計算します。
HDL コード生成
HDL Coder™ を使用して FPGA 設計および ASIC 設計のための VHDL、Verilog および SystemVerilog のコードを生成します。
どちらの入力もスカラーでなければならず、また指数の入力 k
は整数の定数でなければなりません。
バージョン履歴
R2010a で導入
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)