matlab - Error: operator *: nonconformant arguments (op1 is rxc, op2 is rxc ) -
i have implemented following function estimate parzen density of matrix,
parzen.m
function [retval] = parzen (matrix, datapoint, variance) [r c] = size(matrix); = ones(r, c)*datapoint; sub = matrix - a; = sub.^2; dw = 2 * variance; firstpart = 1/(sqrt(2*pi*variance)); retval = firstpart * exp((-1)*(up/dw));
error
>> parzen(train, test, 0.25) error: parzen: operator *: nonconformant arguments (op1 1824x8, op2 1824x8 ) error: called parzen @ line 3 column 4 >>
how can rid of error?
the commenet @benoit_11 solved issue.
a = ones(r,c) .* datapoint.
Comments
Post a Comment