A $C^\infty$-function on a submanifold which is not the restriction of a a $C^\infty$ on $M$

I am looking for an example showingthat a function $f$ which is $C^\infty$ on a submanifold $N$ of $M$, but it cannot be written as the restriction of a $C^\infty$-function on $M$.

-
Assuming $N$ is meant to be closed in $M$ (you don't clarify your definition of "submanifold"), there are no such examples (i.e., every smooth function on $N$ lifts to one on $M$), due to constructions using partitions of unity and the openness of $M-N$ in $M$ to patch local lifts into a global one. Of course, if you allow open sub manifolds then there are trivial examples such as $1/x$ on $N = \mathbf{R}^{\times}$ inside $M = \mathbf{R}$. – user30379 Jan 5 '13 at 15:39
Yes. BE a submanifold, I mean an open submanifold. Thanks. – hamid Jan 5 '13 at 17:35
The absolute value of $x$ on the nonzero reals. – Lunasaurus Rex Jan 6 '13 at 0:09
Or $1/x$ on the nonzero reals. – Gerald Edgar Jan 6 '13 at 17:42

You can take $M = \{ z \in \mathbb{C} \colon |z|=1\}$, $N = M \setminus \{1\}$ and $f(e^{i\varphi}) = \varphi$.