FI data type NOT operator?
이전 댓글 표시
I am trying to take the BITNOT of an FI data type. For example if I have the following code:
tst = fi(5, numerictype(0,4,0));
How would I get the bitwise NOT of 5 (which should be hex A, or 10)? The ~ operator is the logical not, and is not what I need. I have searched the documentation, and maybe I missed it, but there does not seem to be anything in the BITWISE operators section. Am I just going nuts? Is the only way to do this do use a for loop with the BITSET/BITGET commands?
Thanks.
채택된 답변
추가 답변 (1개)
Kaustubha Govind
2011년 7월 22일
You can use BITCMP:
tst = fi(5, numerictype(0,4,0))
tst_not = bitcmp(tst)
카테고리
도움말 센터 및 File Exchange에서 Hilbert and Walsh-Hadamard Transforms에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!