关于matlab中矩阵乘法问题

来源:百度知道 编辑:UC知道 时间:2024/05/21 00:14:10
我这哪错了?

a=imread('G:\face\yaleB01_P02\images\yaleB01_P02A-025E+00.pgm');
b=a*a'
??? Error using ==> mtimes
At least one operand must be scalar.
其中
a <480*640 unit8>.
即480*640的矩阵。

奇怪,我也试了,把它转成double就可以,uint8就不行,不过我得到的出错信息是Matrix dimensions must agree. 你转成double型计算吧,本来uint8做乘法就不可靠,可能会溢出。

以上。
专业路过的老狼