I think the default cost type in Matlab is auto where we try to detect the cost type automatically. I think there should be some output info in the example about this.
Yes, just that you cannot use inf but that has been discussed in other threads in the forum.