sign
配列に対する符号関数 (関数 signum) の実行
説明
例
符号関数を求める
fi
オブジェクトの符号関数を求めます。
sign(fi(2))
ans = int8 1
符号付き fi
ベクトルの符号関数を求めます。
v = fi([-11 0 1.5],1); sign(v)
ans = 1×3 int8 row vector -1 0 1
符号なし fi
ベクトルの符号関数を求めます。
u = fi([-11 0 1.5],0); sign(u)
ans = 1×3 int8 row vector 0 0 1
入力引数
a
— 入力配列
スカラー | ベクトル | 行列 | 多次元配列
入力配列。fi
スカラー、ベクトル、行列または多次元配列として指定します。
sign
は、複素数の fi
入力をサポートしていません。
データ型: fi
拡張機能
C/C++ コード生成
MATLAB® Coder™ を使用して C および C++ コードを生成します。
HDL コード生成
HDL Coder™ を使用して FPGA 設計および ASIC 設計のための VHDL、Verilog および SystemVerilog のコードを生成します。
バージョン履歴
R2006a より前に導入
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)