FlorianASchroeder / TDVP

Tree-Tensor-Network State for Bosons
4 stars 0 forks source link

fix sizes of tresults.star.n and tresults.star.x in calTimeObservables.m #4

Closed jfeist closed 8 years ago

jfeist commented 8 years ago

the assignments are

tresults.star.n(pos,:,:) = single(occ(2,:,:));

and

tresults.star.x(pos,:,kk,:) = single(polaron(kk+1,:,:));

so I think the second dimensions should agree with the second dimensions of occ and polaron, respectively, not the first ones as they were allocated.

FlorianASchroeder commented 8 years ago

Yes taking size(..,2) is definitely the better option. Length() only takes max(size(..)) which picks out the first dimension in a case where NC > 10*L.