Code covered by the BSD License  

Highlights from
What's New for Object-Oriented Programming in MATLAB Webinar - Code Examples

image thumbnail
from What's New for Object-Oriented Programming in MATLAB Webinar - Code Examples by Stuart McGarrity
Code examples used in "What's New for Object-Oriented Programming in MATLABĀ®" Webinar

magfftplot(obj, zeroPadTo)
function magfftplot(obj, zeroPadTo)
% MAGFFTPLOT Plot the magnitude square of the FFT of the sensor array data
% Example:
%  magfftplot(s,128);

clf
[mags, fflip]=magfft(obj, zeroPadTo);
semilogy(180*fflip,mags(1:zeroPadTo),'r');
grid
title(['Averaged FFT of: ' obj.Name]);
xlabel('degrees');
ylabel('amplitude');
end

Contact us at files@mathworks.com