MATLAB使用集锦一
来源:互联网 发布:mac和nars口红哪个滋润 编辑:程序博客网 时间:2024/06/12 23:45
2017/9/23 0:09
学习fprintf和dec2bin函数的使用(摘自bitshift的help文档)
a = intmax('uint8');s1 = 'Initial uint8 value %5d is %08s in binary\n';s2 = 'Shifted uint8 value %5d is %08s in binary\n';fprintf(s1,a,dec2bin(a)) for i = 1:8 a = bitshift(a,1); fprintf(s2,a,dec2bin(a)) end
结果
Initial uint8 value 255 is 11111111 in binaryShifted uint8 value 254 is 11111110 in binaryShifted uint8 value 252 is 11111100 in binaryShifted uint8 value 248 is 11111000 in binaryShifted uint8 value 240 is 11110000 in binaryShifted uint8 value 224 is 11100000 in binaryShifted uint8 value 192 is 11000000 in binaryShifted uint8 value 128 is 10000000 in binaryShifted uint8 value 0 is 00000000 in binary
阅读全文
0 0
- MATLAB使用集锦一
- C#使用MATLAB集锦
- C#使用Matlab集锦
- matlab安装使用出错解决方案集锦
- matlab集锦
- Linux 使用技巧集锦(一)转
- Microsoft Visual Studio 使用集锦一
- MATLAB使用备注(一)
- Matlab问题集锦
- MATLAB中小技巧集锦
- matlab 常用命令集锦
- matlab画图集锦
- matlab函数的集锦
- matlab函数集锦
- matlab知识集锦
- matlab知识集锦
- Matlab绘图集锦
- matlab 函数集锦
- lua中面向对象(class)实现探索(一)
- 2017.9.23步入大三狗的我
- Linux操作系统的安装
- Ubuntu 中常用的命令
- 调参神器:Hyperopt
- MATLAB使用集锦一
- PAT 甲级 1025. PAT Ranking (25)
- wordpress代码实现网站地图sitemap的html和xml的方法
- 20 多个可以提高你Android开发技能的国外优秀开源 app
- 搭建图片服务器《四》:后台java代码springMVC+spring实现图片上传
- lua中面向对象(class)实现探索(二)
- 关于AI算法芯片实现的几点看法(原创)
- HttpClient 实现 快递100 快递查询
- iOS dispatch_async到主线程封装C接口