Calculates discrete levels given the parameter matrix. | |
2-D interpolation (table lookup). |
Auxiliary function used by ESTSMCTP |
01 function [F1,param1] = scalemat(param,F,m,s,param1) 02 % SCALEMAT Scale and translate a cycle matrix. 03 % 04 % [F1,param1] = scalemat(param,F,m,s,param1) 05 06 F = flipud(F)'; % Convert to PJ-def 07 08 u=levels(param); 09 v=levels(param1); 10 11 n1=param1(3); 12 F1 = zeros(n1,n1); 13 14 for i=1:n1-1 15 for j=i+1:n1 16 ui = (v(i)-m)/s; 17 uj = (v(j)-m)/s; 18 F1(i,j)=interp2(u,u,F,uj,ui); 19 end 20 end 21 22 [I,J] = find(isnan(F1)==1); 23 for k=1:length(I) 24 F1(I(k),J(k)) = 0; 25 end 26 27 F1 = flipud(F1'); 28
Comments or corrections to the WAFO group