I am using the function findchangepts to find abrupt changes in a spectrogram:
[s,f,t,pxx] = spectrogram(data, 128, 120, 128, fs)
It outputs a figure, which I would like to keep as it is. But I would also like to save the output 'ipt', like with:
ipt = findchangepts(pow2db(pxx),'MaxNumChanges', 2);
How can I both have the figure and the ipt without running the function twice?