我需要编写一组图像,这些图像是在for循环中计算的。如果我使用sprintf
定义路径,则会收到错误
Error using fitsiolib
CFITSIO library error (105): couldn't create the named file
Error in matlab.io.fits.createFile (line 32)
fptr = fitsiolib('create_file',filename);
Error in fitswrite (line 67)
fptr = fits.createFile(filename);
Error in Calculation_correction_image (line 23)
fitswrite(image_calculated, t);
您对如何避免这种情况有任何建议吗?以下是计算图像的代码部分:
k = 0;
for j=0:40
image_calculated = (image_summed_start - (image_correction*j))/image_summed_start;
t = sprintf('image_projection_%02i.fits',j)
A = j
fitswrite(image_calculated, t);
end