Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

I am unable to generate a waterfall plot for my vibration data

2 vues (au cours des 30 derniers jours)
Nilesh Naik
Nilesh Naik le 28 Juin 2018
Clôturé : Nilesh Naik le 17 Avr 2022
I am looking to create a waterfall plot for my vibration data. The data includes Amplitude and time i did an FFT and now trying to perform a waterfall analysis
Here is my code
x1=Frequencycheck.Channelname; x2=Frequencycheck.Input0; Fs = 25600; % Sampling frequency T = 1/Fs; % Sampling period L = 25600; % Length of signal t = (0:L-1)*T; % Time vector Y = fft(x2);
%Compute the two-sided spectrum P2. Then compute the single-sided spectrum P1 based on P2 and the even-valued signal length L.
P2 = abs(Y/L); P1 = P2(1:L/2+1); P1(2:end-1) = 2*P1(2:end-1);
%figure for good fan
f = Fs*(0:(L/2))/L; %frequency domain f figure plot(f,P1,'k') title('Single-Sided Amplitude Spectrum of X(t)GOOD FAN') xlabel('f (Hz)') ylabel('|P1(f)|')
I have tried waterfall function but it only gives me error saying
waterfall(P1,t,f) Error using horzcat Dimensions of arrays being concatenated are not consistent.
Error in waterfall (line 64) z = [z0*ones(size(x,1),1) z(:,1) z z(:,size(z,2)) z0*ones(size(x,1),2) ];
Maybe I am doing something wrong.
I need help. Thanks in advance.

Réponses (0)

Cette question est clôturée.

Produits


Version

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by