WAFOFIG4 Directional spectra using Thorsethaugen and cos2s spreading function with s=15 (solid) and s frequency dependent (dash)
Make a directional spectrum | |
Directional spreading functions | |
Prints a caption "made by WAFO" in current figure. | |
Plot a spectral density | |
Clear variables and functions from memory. | |
Hold current graph. | |
Linearly spaced vector. |
01 function wafofig4 02 % WAFOFIG4 Directional spectra using Thorsethaugen and cos2s spreading 03 % function with s=15 (solid) and s frequency dependent (dash) 04 % 05 06 07 global WAFOFIGNUM 08 09 if isempty(WAFOFIGNUM) 10 disp('You must start wafodemo in order to run this script') 11 clear global WAFOFIGNUM 12 return 13 end 14 global St Tp ma mb sp 15 D=spreading(51,'cos2s',0,[sp sp 2*pi/Tp 0 0],St.w,0); 16 Std=mkdspec(St,D); 17 Dw=spreading(linspace(-pi,pi,51),'cos2s',0,[sp sp 2*pi/Tp ma mb],St.w); 18 Stdw=mkdspec(St,Dw); 19 20 wspecplot(Std,1,'k-'), hold on 21 wspecplot(Stdw,1,'k--'),hold off 22 wafostamp('Figure 4','(ER)') 23
Comments or corrections to the WAFO group