- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't if a four lines code can be considered "quite complex"... Say:
integer, parameter :: nData = 10, nVar = 1
real, allocatable :: X(:, :), STAT(:, :)
real, allocatable :: X(:, :), STAT(:, :)
allocate(X(nData, nVar), STAT(15, nVar))
...
call UVSTA(X, STAT)
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".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Don't forget the USE UVSTA_INT or whatever the manual says is needed.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page