Nufftn yields only zeros for nonuniform grid. Bug?

조회 수: 1 (최근 30일)
schlapp
schlapp 2020년 4월 28일
편집: schlapp 2020년 4월 29일
Following up a previous question from myself on this site, I decided to ask again about my second point more precisely.
My main issue is that in my test-case of a simple Gaussian the built-in MATLAB function 'nufftn' only gives a matrix of zeros as a result when using the nonuniform grid 'pcrop.mat', provided in the attachment.
in other words:
fcrop = exp(-(pcrop.^2 + pcrop'.^2 + pcrop.*pcrop'));
ftcrop = reshape(nufftn(fcrop,{pcrop,pcrop'},{pcrop,pcrop'})/2/pi,length(pcrop),length(pcrop));
yields 'ftcrop' as 2d matrix full of zeros.
Performing the same task with a interpolated uniform grid
puni=[pcrop(1):2*pcrop(end)/(length(pcrop)-1):pcrop(end)];
funi = exp(-(puni.^2 + puni'.^2 + puni.*puni'));
ftuni = reshape(nufftn(funi,{puni/sqrt(2*pi),puni/sqrt(2*pi)'},{puni/sqrt(2*pi),puni/sqrt(2*pi)'})/2/pi*(2*puni(end)/length(puni))^2,length(puni),length(puni));
gives the correct matrix 'ftuni'.
Is this a bug, or am I using the function in a wrong way? Unfortunately I dont get any error messages.

채택된 답변

Chris Turnes
Chris Turnes 2020년 4월 29일
Yes, this appears to be a bug. Please open a case with technical support.
  댓글 수: 1
schlapp
schlapp 2020년 4월 29일
편집: schlapp 2020년 4월 29일
Thank you for the feedback, I will open a case then. I guess this can happen with new features :)

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by