Parent Directory
|
Revision Log
|
Revision Graph
initial checkin of Timour's MatLAB scripts
| 1 | function frm=frmax(p,le,r) |
| 2 | if (p~=1.) |
| 3 | a=p-1.; |
| 4 | b=(p+1.-2.*p.*le).*r./le; |
| 5 | c=(p.*le+1.-2.*p).*r./le; |
| 6 | d=(p.*le-1.).*r.*r./le./le; |
| 7 | h=(3.*a.*c-b.*b)./(9.*a.*a); |
| 8 | k=(2.*b.*b.*b-9.*a.*b.*c+27.*a.*a.*d)./(27.*a.*a.*a); |
| 9 | th=(acos(-k./(2.*(-h).^1.5)))./3.; |
| 10 | end %if |
| 11 | |
| 12 | if (p>1) |
| 13 | frm=2.*sqrt(-h).*cos(th+4*pi/3)-b./(3.*a); |
| 14 | elseif (p<1) |
| 15 | frm=2.*sqrt(-h).*cos(th)-b./(3.*a); |
| 16 | elseif (p==1) |
| 17 | frm=0.5.*sqrt(0.25+2.*r./le)+0.25; |
| 18 | elseif (p==0) |
| 19 | frm=sqrt(r./le) |
| 20 | end |
| 21 | return |
| ViewVC Help | |
| Powered by ViewVC 1.1.22 |