update matlab grid example for all 4 methods