Mercurial > repos > public > sbplib
changeset 702:40299ae5fabe feature/optim
changed penalty
author | Ylva Rydin <ylva.rydin@telia.com> |
---|---|
date | Fri, 20 Oct 2017 09:43:07 +0200 |
parents | e89715fe6a6e |
children | 027f606fa691 |
files | +scheme/Schrodinger1dCurve.m |
diffstat | 1 files changed, 1 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
diff -r e89715fe6a6e -r 40299ae5fabe +scheme/Schrodinger1dCurve.m --- a/+scheme/Schrodinger1dCurve.m Thu Oct 19 09:48:18 2017 +0200 +++ b/+scheme/Schrodinger1dCurve.m Fri Oct 20 09:43:07 2017 +0200 @@ -122,14 +122,7 @@ tau1 = @(t) s * 1i*obj.Ji(p,p)*d; tau2 = @(t) (1*s*obj.a(p,p))/2*e; closure = @(t)obj.Hi*sqrt(obj.Ji)*(tau1(t)*e' + tau2(obj.a)*e')*sqrt(obj.Ji); - - switch class(data) - case 'double' - penalty = @(t) -obj.Hi*sqrt(obj.Ji)*(tau1*data+tau2(obj.a)*data)*sqrt(obj.Ji); - - otherwise - error('Weird data argument!') - end + penalty = @(t) -obj.Hi*sqrt(obj.Ji)*(tau1(t)*e' + tau2(obj.a)*e')*sqrt(obj.Ji); % Unknown, boundary condition otherwise error('No such boundary condition: type = %s',type);