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

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

Initial import--MML version from SOLEIL@2013

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.