Matlab Expanding Foam