在MATLAB中转换为unit8数据类 [英] Conversion to unit8 data class in MATLAB

查看:702
本文介绍了在MATLAB中转换为unit8数据类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在初级阶段,我是Matlab的新手.我想知道

I am new to matlab in beginner phase. I want to know that

如何将值[0 255]以外的(2 * 3)矩阵转换为uint8?

How to convert a (2*3) matrix having values out side the range [0 255] to an uint8?

我正在尝试将其转换为unit8数据类,但是它使用以下语法给了我以下错误. B =单元8(A).其中A is 2*3 Matrix values [4 5 6 ; 2 4 5]

I am trying to convert it to unit8 data class but it gives me the following error with the following syntax. B=unit8(A). where A is 2*3 Matrix values [4 5 6 ; 2 4 5]

错误: 对于类型为'double'的输入参数,未定义函数'unit8'.

error: Undefined function 'unit8' for input arguments of type 'double'.

推荐答案

这是拼写错误.是uint8而不是unit8

It is spelling Mistake. it is uint8 not unit8

这篇关于在MATLAB中转换为unit8数据类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆