我试图乘以矩阵的第一列。我曾尝试这样的代码:矢量矩阵乘法
A = imread('cameraman.tif');
x0 = A(:,1);
y = A*x0;
,但我得到了以下错误:
Error using * MTIMES is not fully supported for integer classes. At least one input must be scalar. To compute elementwise TIMES, use TIMES (.*) instead.
,当我我的代码更改为:y = A.*x0;
我再次得到:
Error using .* Matrix dimensions must agree.
当我使用whos
命令,我得到这个: A是一个256x256矩阵和x0是一个256x1矩阵。我不知道我的代码有什么问题。