joonor23
joonor23

Reputation: 25

A^t * A won't work in matlab?

I'm trying get A^T * A. but if I try it, I get the error

Error using  * MTIMES is not fully supported for integer classes. 
At least one input must be scalar. To compute elementwise TIMES, use TIMES (.*) instead.

so I did A^T .* A and it gave me the error

Matrix dimensions must agree.

I don't get it? shouldn't ATA work fine?

A is

A = imread('C:\Users\user1\Documents\MATLAB\5\assignment05_A.jpg');
A = rgb2gray(A); 

before trying the multiplication

How do i get a A^T * A matrix??

Upvotes: 0

Views: 203

Answers (1)

Steve
Steve

Reputation: 1587

You can convert to an array of double precision with double then plot with imshow;

A = double(rgb2gray(A));
ATA = A'*A;
imshow(ATA,[]);

Upvotes: 1

Related Questions