[scilab-Users] the strangest bug I ever experienced

Peter Hinow hinow at uwm.edu
Thu Aug 11 00:21:41 CEST 2011


Dear Francois,
thank you for your help. I really should have thought about it myself.
Regards,
      Peter

----- Original Message -----
From: "François Vogel" <fvogelnew1 at free.fr>
To: users at lists.scilab.org
Sent: Wednesday, August 10, 2011 5:17:28 PM
Subject: Re: [scilab-Users] the strangest bug I ever experienced

I would suggest you start here:
   http://bugzilla.scilab.org/show_bug.cgi?id=3835

More specifically, look at this:

-->[4*X(7) + X(2) - 1]
  ans  =

   - 0.3

-->[4*X(7) + X(2) -1]
  ans  =

     0.7  - 1.

(see the difference? the space was removed between the minus sign and 
the 1)

I'm not saying this behavior is wrong or fine, just explaining what 
you're seeing.

F.


Peter Hinow said on 10/08/2011 22:09:
> Dear fellows,
>
> can somebody please try to run the little code below? The function fff should take a 7-dimensional vector and return another 7-dimensional vector,
> namely
>    - 0.4  - 0.3   - 0.5    - 0.28  - 0.07  - 0.07  - 0.0796 .
> But what it does it returns a 9-dimensional vector
>    - 0.4  - 0.3    0.5  - 1.    0.72  - 1.  - 0.07  - 0.07  - 0.0796
> where for example -0.5 is written as "0.5 - 1". Of course then the fsolve does not work.
> What could be the cause of this?
> Thank you and best regards,
>         Peter
>
> function y=fff(X) // X = [d1 h1 d2 h2 d3 h3 r]
>    y=[2*X(7) + X(1) + 2*X(3)-1, ..
>       4*X(7) + X(2) - 1, ..
>       2*X(7) + X(4) + X(6) -1, ..
>       4*X(7) + X(3) + X(5) -1, ..
>       X(1)^2+X(2)^2-4*X(7)^2, ..
>       X(3)^2+X(4)^2-4*X(7)^2, ..
>       X(5)^2+X(6)^2-4*X(7)^2];
> endfunction
> X = [0.1, 0.1, 0.1, 0.1, 0.02, 0.1, 0.15];
> fff(X)
>
> xx = fsolve([0.1, 0.1, 0.1, 0.1, 0.02, 0.1, 0.15],fff);
> d1 = xx(1); h1 = xx(2); d2 = xx(3); h2 = xx(4);
> d3 = xx(5); h3 = xx(6); r = xx(7)
>

-- 
Peter Hinow, PhD
Department of Mathematical Sciences
University of Wisconsin - Milwaukee
P.O. Box 413
Milwaukee, WI 53201-0413
USA
phone: ++1 414 229 4933
https://pantherfile.uwm.edu/hinow/www/




More information about the users mailing list