intbitcopy and uintbitcopy

バージョン 1.0.0.0 (5.83 KB) 作成者: James Tursa
Exact bit copy of variable into signed int__ or unsigned uint__ of same element size
ダウンロード: 938
更新 2007/11/14

ライセンスがありません

Two c-mex functions are supplied. intbitcopy copies a variable into an integer equivalent of the same data element size using an exact bit copy. E.g., doubles are copied to int64, singles are copied into int32, char is copied into int16, etc. Similar to typecast except the result is based on the data element size rather than fixed by input selection. intbitcopy will handle any number of input arguments as long as there are matching output arguments to store the results. For structures and cells, intbitcopy will convert each individual component or cell, keeping the overall structure of the variable the same (same field names, same cell layout, etc.). For non-convertible types (e.g., vpa, function handles, etc.), intbitcopy will return a deep copy. The 2nd mex function uintbitcopy behaves exactly the same as intbitcopy except it returns unsigned integer types.

引用

James Tursa (2024). intbitcopy and uintbitcopy (https://www.mathworks.com/matlabcentral/fileexchange/17515-intbitcopy-and-uintbitcopy), MATLAB Central File Exchange. 取得済み .

MATLAB リリースの互換性
作成: R2006a
すべてのリリースと互換性あり
プラットフォームの互換性
Windows macOS Linux
カテゴリ
Help Center および MATLAB AnswersLogical についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
バージョン 公開済み リリース ノート
1.0.0.0