How to use bitn
5 次查看(过去 30 天)
显示 更早的评论
pretty much the question, i want to write variables as bitn but i dont understand exactly how to
0 个评论
回答(2 个)
John D'Errico
2022-5-14
You cannot define a scalar variable as a binary one with an arbitrary number of bits. You can define integer variables, with a specific number of choices, but those integer classes are limited.
However, nothing stops you from defining a vector that would contain the bits as you wish, as separate elements of that vector.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Matrices and Arrays 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!