fix matlab plot bug