I have to write a code that calculates wave height, wave length, and period from bottom mounted pressure gauges in the ocean. I am using a FFT to create a spectral density plot. Where do I go from there?
조회 수: 3 (최근 30일)
이전 댓글 표시
plot(index_DW, pressure_DW, 'b', index_SW, pressure_SW, 'r') %from graph, find cells 8800-9000 average mean Patm=mean(pressure_DW(8800:9000)) rho=1025 %density g=9.81 %gravity deep_z=(pressure_DW-Patm)./rho./g*1000 %deep water elevation plot(deep_z) %about 5m = 16.405ft deep_Z=deep_z(2100:7500) %trim signals, **indices changed date_time_dw=date_time_DW(2100:7500) %trim all signals the same way; sync plot(date_time_dw) plot(date_time_dw,deep_Z) %time/temp
depth_deep=mean(deep_Z) deep_eta=detrend(deep_Z) plot(date_time_dw,deep_eta)
m=length(deep_eta) n=pow2(nextpow2(m)) Fn=fft(deep_eta,n) Fm=fft(deep_eta,m) plot(Fm) figure plot(Fn)
SFn=2.*(Fn.*conj(Fn)) %folds SFm=2.*(Fm.*conj(Fm)) plot(SFn) figure plot(SFm) plot(SFm(1:length(SFm/2))) plot(SFn) figure plot(SFm) %only slight differences between the two SFn and SFm, plotted by indices
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!