How to calculate each consecutive 2data standard deviation
2 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(1 个)
Walter Roberson
2017-11-19
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 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!