Home > wafo > markov > scalemat.m

# scalemat

## PURPOSE

Scale and translate a cycle matrix.

## SYNOPSIS

[F1,param1] = scalemat(param,F,m,s,param1)

## DESCRIPTION

```  SCALEMAT Scale and translate a cycle matrix.

[F1,param1] = scalemat(param,F,m,s,param1)```

## CROSS-REFERENCE INFORMATION

This function calls:
 levels Calculates discrete levels given the parameter matrix. interp2 2-D interpolation (table lookup).
This function is called by:
 f_smctp Auxiliary function used by ESTSMCTP

## SOURCE CODE

```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```

Mathematical Statistics
Centre for Mathematical Sciences
Lund University with Lund Institute of Technology

Comments or corrections to the WAFO group

Generated on Thu 06-Oct-2005 02:21:16 for WAFO by m2html © 2003