Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/image-processing/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
matlab单元插入问题_Matlab_Image Processing_Compiler Errors_Cell - Fatal编程技术网

matlab单元插入问题

matlab单元插入问题,matlab,image-processing,compiler-errors,cell,Matlab,Image Processing,Compiler Errors,Cell,我正在尝试将彩色图像转换为灰度,调整其大小并将其放入单元格中。我为此编写了以下代码。但是我犯了一个错误。我做错了什么? 代码: 错误: ??? Conversion to cell from uint8 is not possible. Error in ==> *** at 16 a(i-3)=x; 假设a已初始化为单元格数组,则必须使用大括号: 假设a已初始化为单元格数组,则必须使用大括号: ??? Conversion to cell from uint8 is not possi

我正在尝试将彩色图像转换为灰度,调整其大小并将其放入单元格中。我为此编写了以下代码。但是我犯了一个错误。我做错了什么? 代码:

错误:

??? Conversion to cell from uint8 is not possible.
Error in ==> *** at 16
a(i-3)=x;

假设
a
已初始化为单元格数组,则必须使用大括号:


假设
a
已初始化为单元格数组,则必须使用大括号:

??? Conversion to cell from uint8 is not possible.
Error in ==> *** at 16
a(i-3)=x;
a{i-3} = x;