summaryrefslogtreecommitdiffstats
path: root/tests/nonRegression/bug2435.sci
blob: f78eee1be3a73791da4e2391821bae1a953b8274 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Scilab Project - Serge Steer
// Copyright INRIA 2007
// Date : June 2007

mode(-1) ;
clear ;
BugNumber=2435;

function [f,g,ind]=cost(x,ind)
  xref=[1;2;3];
  f=0.5*norm(x-xref)^2
  g=x-xref;
endfunction

x0=[1;-1;1];
T=execstr('[f,xopt]=optim(cost,,''b'',-2*ones(x0),2*ones(x0),x0);','errcatch')==54
    
affich_result(T,BugNumber) ;
clear ;