Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29235 Discussions

How can visual Fortran do some basic statistic work with imsl?

seahearman
Beginner
362 Views

I have kownn that the imsl got quite a lotfunctions for mathcomputing,butit is strage that I can not findthe function for mean or variance of a sample(I kown there are some functions can compute mean or vaiance of a sample ,however,they always output the result and they are quite complex for I just wonder whether there any funtion like sample_mean=mean(sample)?)

Many thanks

0 Kudos
2 Replies
John4
Valued Contributor I
362 Views
I don't if a four lines code can be considered "quite complex"... Say:
integer, parameter :: nData = 10, nVar = 1
real, allocatable :: X(:, :), STAT(:, :)
allocate(X(nData, nVar), STAT(15, nVar))
...
call UVSTA(X, STAT)
And by the way, inbasic statistics you usually need at least the mean and the standard deviation for whatever it is that you want to do with your data, so it seems logical to have a single function giving you all the parameters.
On the other hand, if the mean is all that want, then you can perfectly write "sum(X) / nData"... OK, just forget that, because it might still be "quite complex".
0 Kudos
Steven_L_Intel1
Employee
362 Views
Don't forget the USE UVSTA_INT or whatever the manual says is needed.
0 Kudos
Reply