Different values of w in MATLAB