How to calculate each consecutive 2data standard deviation
1 view (last 30 days)
Show older comments
Hi,
I have the below data:
0.12 0.235 0.362
0.125 0.254 0.362
0.131 0.254 0.356
0.235 0.254 0.563
0.326 0.258 0.635
0.362 0.562 0.635
0.362 0.562 0.635
0.523 0.568 0.725
0.555 0.598 0.789
0.555 0.598 0.568
0.555 0.598 0.568
0.555 0.598 0.568
0.555 0.598 0.568
0.555 0.598 0.568
0.555 0.598 0.568
0.555 0.598 0.568
Want to calcaulate STD of each two consecutive data by column.
Kindly help someone, many thanks in advance,
0 Comments
Answers (1)
Walter Roberson
on 19 Nov 2017
reshape( std(reshape(YourData, 2, size(YourData,1)/2, size(YourData,2))), [], size(YourData,2))
or
abs(YourData(1:2:end,:) - YourData(2:2:end,:))/sqrt(2)
The second of these works because the standard deviation between exactly two values X and Y is abs(X-Y)/sqrt(2)
2 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!