Z must be a matrix, not a scalar or vector.
조회 수: 1(최근 30일)
really don't understand this "." syntax stuff
d = 0:1:10;
g = 0:1:10;
t = 1;
[D,G] = meshgrid(d,g);
Z = (4.*d.*k.*g.^((k-4)./k).*(k-1).*(3.*g.^(1./k).*(g.^(1./k)-2.*t.^2.*(3.*k-3))+24.*t.^4+4.*k.*(k.^(2)-5).*t.^4))./(2.*d.*k.*(g.^(1./k)-2.*t.^2.*(k-1)).*g.^((k-2)./k)).^2;
does not work, probably because im missing a '.' or have put to many in.
what am I doing wrong?
Patrick Kalita 2011년 5월 3일
Your computation is done entirely with d and g which are vectors. Hence your output is a vector.
Perhaps you meant to use D and G -- which are matrices -- in your computation of Z?