Create cost.m