World number one Roger Federer dismissed suggestions his career was in decline and said he would use recent defeats as motivation after recovering from a virus.

The Swiss player lost in the first round in Dubai last week by Briton Andy Murray, his first match since defeat by eventual champion Novak Djokovic in the Australian Open semi-finals in January.

"In Switzerland there is a little too much speculation my career is over," the 26-year-old Federer told a news conference before Monday night's 6-3 6-7 7-6 victory over former world number one Pete Sampras in an exhibition match at the Madison Square Garden.

"People just need to know I'm healthy and happy and not miserable and down and out."

Federer pulled out victory in the good-natured contest by 8-6 in the final set tie-breaker before a crowd of around 19,000 at the Garden, including world number one golfer Tiger Woods, the Swiss champion's friend.

Federer, the 12-times grand slam singles champion, competes at the Pacific Life Open at Indian Wells, California this week. He was told he was suffering from glandular fever after the Australian Open.

"Honestly, losses like this motivate me more than anything," said Federer. "Trying to come back, trying to prove I'm still the one to beat.

"I just want to show I can do it over and over again."

The back-to-back defeats dented Federer's aura of invincibility and fed the confidence of those younger rivals who have seen him reign as number one for a record 215 consecutive weeks.

Within two grand slam titles of Sampras's record haul of 14, Federer said his affection for tennis was greater than ever.

"I love competing on centre courts all over the world. So many people are happy when I get there. It touches me. I love to practise more and more now," he said.

"What I enjoy most are the matches, the pressure, the fans, centre court. I hope that's going to stay with me as long as possible."

Federer said he was looking forward to competing at the Beijing Olympics in August and future Games.

"The (London) Olympic Games in 2012 is something I'm looking forward to, and go from there. See how I feel with my fitness, my motivation."

Federer may have made his worst start to a season in eight years but Sampras was confident the Swiss would soon be winning again.

"In a lot of ways Roger has created this sort of monster of being unbeatable," said the 36-year-old American.

"If you lose a match here, lose a match there, people have the assumption he has lost his edge. I don't look at it like that at all.

"He'll play Indian Wells and he'll play Miami (in two weeks) and do fine at those events. When it comes down to it at the big, big events, I think he'll be the guy standing with the trophy."

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.