简体   繁体   English

Matlab - 为什么我会收到此错误

[英]Matlab - Why am I getting this error

I have typed the following in matlab : 我在matlab输入了以下内容:

>> I=imread('23X41.jpg');
>> fun = @(x) sum(x(:).^2)/sum(x(:)).^2; 
>> en= nlfilter(I,[4 4],fun);

And, got the following error? 并且,出现以下错误?

??? Error using ==> plus
Matrix dimensions must agree.

Error in ==> nlfilter at 52
aa = mkconstarray(class(a), padval, size(a)+nhood-1);

Why am I getting this error especially that I'm sliding a 4x4 window on a 23x41 image? 为什么我会收到此错误,特别是我在23x41图像上滑动4x4窗口? Why are the matrix dimensions mentioned here? 为什么这里提到的矩阵尺寸?

Thanks. 谢谢。

确保您的图像是2D而不是3D阵列的彩色图像。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 为什么会出现vertcat错误? (Matlab) - Why am I getting a vertcat error? (Matlab) 为什么我突然在MATLAB中收到无效的文件标识符错误? - Why I am suddently getting invalid file identifier error in MATLAB? 为什么在MATLAB中使用fprintf会出错? - Why am I getting an error for using fprintf in MATLAB? 为什么我在 ubuntu 中安装 matlab 时出现许可证错误 - Why i am getting license error while installing matlab in ubuntu MATLAB:为什么我没有任何输出? - MATLAB: why I am not getting any output? matlab:为什么我会收到这个错误?无效的表达式。 调用 function 或索引变量时,请使用括号 - matlab:why am i getting this error?nvalid expression. When calling a function or indexing a variable, use parentheses 为什么我在 Matlab 中收到“无法读取文件 'topo60c'。没有这样的文件或目录”错误? - Why am I getting "Unable to read file 'topo60c'. No such file or directory" error in Matlab? 为什么在Matlab中出现“在调用期间未分配输出参数”错误 - Why am I getting 'output argument not assigned during call to' error in Matlab MATLAB:为什么我没有在游标对象中得到SQL结果? - MATLAB : why am I not getting the SQL result back in the cursor object? 为什么我在Matlab中得到错误的矩阵范数? - Why I am getting wrong matrix norm in matlab?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM