source: MML/trunk/machine/SOLEIL/common/toolbox/SymbolicPolynomials/SymbolicPolynomials/@sympoly/sqrt.m

Last change on this file was 17, checked in by zhangj, 10 years ago

To have a stable version on the server.

  • Property svn:executable set to *
File size: 295 bytes
Line 
1function sp=sqrt(sp)
2% sympoly/sqrt: sqrt of a sympoly (sp.^0.5)
3% usage: sp=sqrt(sp);
4%
5% arguments:
6%  sp - sympoly object
7
8if length(sp.Coefficient)>1
9  error 'Sqrt of a sympoly with multiple terms is not implemented.'
10end
11
12sp.Exponent=sp.Exponent/2;
13sp.Coefficient=sqrt(sp.Coefficient);
14
15
Note: See TracBrowser for help on using the repository browser.