Error using ones because of NaN and Inf not allowed

在可视化操作中发现reho值 (F_reho_PairwiseDiff_Z_G1vsG2.nii) 的结果无法成功显示. 提示内容是 Error using ones (NaN and Inf not allowed). Please help.

AttachmentSize
Image icon The error99.4 KB

Use some codes to change that.

[Data Header]=y_Read('XXX.nii');

Data(find(isnan(Data)))=0;

Data(find(isinf(Data)))=0;

y_Write(Data,Header,'XXXNew.nii');