Thank Patrick Ewing for helping solve the Knicks’ latest crisis at center.

And thank Carmelo Anthony for a players-only meeting staged Tuesday that woke up the troops. And most of all, thank Andrea Bargnani for turning in a performance worthy of the first overall pick in the draft and worthy of, yes, Knicks legend Patrick Ewing.

In Ewing’s head-coaching debut caused by Steve Clifford’s heart procedure, Bargnani played like Ewing and led the Knicks with a spectacular showing as the reeling franchise broke its three-game losing streak in a 101-91 romp over the Bobcats at Time Warner Arena.

“Sometimes you need to just get together and talk and communicate and let it all out and try to figure out what the problem and issue is,’’ said Anthony, who called the team meeting after Tuesday’s loss to Charlotte. “We responded well tonight.’’

Playing their first game without injured center Tyson Chandler (broken fibula), the Knicks were sharp in all facets and Anthony regained his superstar form in scoring a game-high 28 points, with eight rebounds and six assists. He shot a healthy 12 of 22.

But the biggest surprise was Bargnani rising to the occasion as the Knicks’ new starting center, playing with aggression and force on both ends. He finished with 25 points, eight rebounds and five blocks.
“We played like our backs were against the wall,’’ Anthony said. “It was a must-win for us. When you talk about must-wins this early, something obviously is going wrong. We corrected it. We took care of the basketball, played defense and our offense was clicking.’’

It was Bargnani’s first 20-point game as a Knick. After averaging 9.0 points per game, Bargnani shot 11 of 25 in 34:48.

“He had that shoot-first mentality,’’ Anthony said. “He had some of the same looks but he wasn’t hesitating, which I like. He was very aggressive on the offensive end tonight. I guess he was tired of hearing [he wasn’t].’’

Coach Mike Woodson said his assistant coaches gave Bargnani a pep talk at the morning shootaround.