Mercurial > hg > ishara
view general/numerical/scalar/quadf.m @ 16:db7f4afd27c5
Rearranging numerical toolbox.
author | samer |
---|---|
date | Thu, 17 Jan 2013 13:20:44 +0000 |
parents | general/numerical/quadf.m@e44f49929e56 |
children |
line wrap: on
line source
% quadf - scalar quadratic form % % quadf :: [Size], real -> [Size]. % quadf :: [Size] -> [Size]. % % Scalar function: quadf(x,s) = -x^2/(2*s), s defaults to 1. function y=quadf(x,s), if nargin<2, y=-(x.^2)/2; else y= -(x.^2)/(2*s); end