Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X
Hi
I have attached 2 x CSV files and Mathcad Prime.
I have isues on Page 5 of 9 calculation mean and SD
Thanks.
Solved! Go to Solution.
@ppal wrote:
Hi
Thanks for your reply. If you notice you will see that your
average calculation is off by a approx factor of 2.
This is due to the fact that there are "unncessary?" zeros in the column
of my data. Don't know how to remove them.
I've just had another look at your worksheet. The easiest way to get rid of those extra zeros is to not have them in the first place. You need a sampling method that contiguously allocates samples to a vector (I have a penchant for stating the blindingly obvious! 😊).
As I've only got Express 7, I've had to resort to some messy (functionally-programmed) function definitions. It would be a lot simpler with programming,
Preliminaries to make manipulating vectors easier.
Then the dropnth and takenth function variants.
And their use in either fixing the already sampled data or returning just the required samples.
Stuart
@ppal wrote:
Hi
I have attached 2 x CSV files and Mathcad Prime.
I have isues on Page 5 of 9 calculation mean and SD
Thanks.
I've only got Prime Express 7, so had to define a few workarounds to get the result I think you intended.
Loc would appear to be a vector, LL a scalar, and iL a range variable. mean and stdev only have a meaning in the context of multiple values of numbers, ie vectors or matrices not scalars. So, I'm guessing that you mean(!) to get the mean and stdev of Loc as a whole.
The expressions as written appear to be using iL to try to calculate the mean & stdev of each value of Loc. Furthermore, a range variable should appear on both sides of a definition, whereas you've only got it on the rhs of sigma's definition.
I've defined mu and sigma to return what I think you want ... at least they display something!
Stuart
@ppal wrote:
Hi
Thanks for your reply. If you notice you will see that your
average calculation is off by a approx factor of 2.
This is due to the fact that there are "unncessary?" zeros in the column
of my data. Don't know how to remove them.
Regards
ppal
It's way past my bedtime and I'm afraid looking at data is beyond my current cognitive state's capabilities. 😴
However, the fix is straightforward, once one realizes that the rhs index needs to increment by double the lhs index. 🙂
Stuart
@ppal wrote:
Hi
Thanks for your reply. If you notice you will see that your
average calculation is off by a approx factor of 2.
This is due to the fact that there are "unncessary?" zeros in the column
of my data. Don't know how to remove them.
I've just had another look at your worksheet. The easiest way to get rid of those extra zeros is to not have them in the first place. You need a sampling method that contiguously allocates samples to a vector (I have a penchant for stating the blindingly obvious! 😊).
As I've only got Express 7, I've had to resort to some messy (functionally-programmed) function definitions. It would be a lot simpler with programming,
Preliminaries to make manipulating vectors easier.
Then the dropnth and takenth function variants.
And their use in either fixing the already sampled data or returning just the required samples.
Stuart