git-svn make executable
[texmacs.git] / src / plugins / matlab / code / num2scm.m
blobe32bf50db88d525684e7cec5dc71596fdfb994de
1 function tmp=num2scm(n)
2         tmp='(with "mode" "math" "';
3         if (isreal(n))
4                 tmp=[tmp, num2str(n), '" )'];
5         else
6                 if (real(n) ~= 0)
7                         if (imag(n)>=0)
8                                 op='+';
9                         else
10                                 op='-';
11                         end
12                         tmp=['(with "mode" "math" "', num2str(real(n)),op,num2str(abs(imag(n))),'<cdot><b-i>")'];
13                 else
14                         tmp=['(with "mode" "math" "', num2str(imag(n)),'<cdot><b-i>")'];
15                 end
16         end