Different color appeared while using helperSpec​trogramAnd​SpectralKu​rtosis() function

Hi, I just started to learn Matlab and quite new to Matlab. I followed the example in Rolling Element Bearing Fault Diagnosisn but my plot of using helperSpectrogramAndSpectralKurtosis(xOuter, fsOuter, level) get different color from the example . What caused it and how do I fix it?

 Accepted Answer

I found the solution simply add
colorball
caxis('auto')
below the code of
plot([xlimits1 NaN xlimits1], [fc_scaled-BW_scaled/2 fc_scaled-BW_scaled/2 NaN fc_scaled+BW_scaled/2 fc_scaled+BW_scaled/2], '--')
in the matlab script file of helperSpectrogramAndSpectralKurtosis.m, then this problem is solved.

More Answers (0)

Products

Release

R2020b

Community Treasure Hunt

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

Start Hunting!