Create threshold.m