Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,25 @@
|
|||
*process source attributes xref;
|
||||
stddev: proc options(main);
|
||||
declare a(10) float init(1,2,3,4,5,6,7,8,9,10);
|
||||
declare stdev float;
|
||||
declare i fixed binary;
|
||||
|
||||
stdev=std_dev(a);
|
||||
put skip list('Standard deviation', stdev);
|
||||
|
||||
std_dev: procedure(a) returns(float);
|
||||
declare a(*) float, n fixed binary;
|
||||
n=hbound(a,1);
|
||||
begin;
|
||||
declare b(n) float, average float;
|
||||
declare i fixed binary;
|
||||
do i=1 to n;
|
||||
b(i)=a(i);
|
||||
end;
|
||||
average=sum(a)/n;
|
||||
put skip data(average);
|
||||
return( sqrt(sum(b**2)/n - average**2) );
|
||||
end;
|
||||
end std_dev;
|
||||
|
||||
end;
|
||||
Loading…
Add table
Add a link
Reference in a new issue