imsave can be called with no arguments to open a tool to save an image that is displayed in the current axes. imsave can also be passed the handle of aa specific primative chart image object .
imsave cannot be passed the data to be saved.
You have a few choices:
- you can display the data as an image inside the loop and call imsave
- you can call uiputfile to permit the user to select a file name each of the 150 times, passing the file name to imwrite
- you can use fullfile and sprintf or equivalent in order to mechanical build a file name at each iteration and inwrite to the file. Optionally call uigetdir once before the loop to permit the user to select the output directory .