11.07.2015 Views

VMD User's Guide

VMD User's Guide

VMD User's Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Examples:vmd > vecsub 6 3.22.8vmd > vecsub {10 9.8 7} {0.1 0 -0.1}9.9 9.8 7.1vmd > vecsub {1 2 3 4 5} {6 7 8 9 10}-5 -5 -5 -5 -5• (C++) vecsum v – Returns the sum of the elements in vExamples:vmd > vecsum { 1 2 3 }6.0• (C++) vecmean v – Returns the mean of the elements in vExamples:vmd > vecmean { 1 2 3 }2.0• (C++) vecstddev v – Returns the standard deviation of the elements in vExamples:vmd > vecstddev { 1 2 3 4 5 6 7 8 9 10 }2.87228131294• (C++) vecscale cv–• (C++) vecscale vc– Returns the vector of the scalar value c applied to each term of vExamples:vmd > vecscale .2 {1 2 3}0.2 0.4 0.6vmd > vecscale {-5 4 -3 2} -210 -8 6 -4vmd > vecscale -2 3-6• vecdot v1 v2 – Returns the scalar dot product of the two vectorsExamples:vmd > vecdot {1 -2 3} {4 5 6}12vmd > vecdot {3 4} {3 4}25vmd > vecdot {1 2 3 4 5} {5 4 3 2 1}35vmd > vecdot 3 -2-6148

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!