Re: [Scilab-users] compilation with OCaml 4.06

2018-02-22 Thread Florian Blachère

Hello Clément,

Thanks for the answer, I installed num and changed the compilation line 
to use ocamlfind but now the compilation fails with :


ocamlfind ocamlopt -package num -I ./src/modelica_compiler -I 
./src/xml2modelica -c src/modelica_compiler/optimization.ml

File "src/modelica_compiler/optimization.ml", line 166, characters 21-22:
Error: This expression has type string but an expression was expected of 
type

 bytes

Is it link to the uodate to OCaml 4.06 ?

Florian

On 21/02/18 11:51, Clément David wrote:

Hello Florian,

The easier would be to depend on the external Num library for the 6.0.x family 
as far as this
library remains available; statically build against it is the way to go for 
OCaml code. Num might
also be packaged in your system, use ocamlfind to look for it.

Thanks,

--
Clément

Le mercredi 21 février 2018 à 08:41 +0100, Florian Blachère a écrit :

Hello,

Scilab 6.0.0 and 6.0.1 (and the master branch) cannot be build using
OCaml 4.06 because this release remove the Num library
(https://ocaml.org/releases/4.06.html#Changes   ,
https://github.com/ocaml/ocaml/pull/1178), do you have any advice to
build Scilab with recent OCaml: integrate Num in Scilab, build Num
oustside of Scilab and link against it, ... ?

Thanks by advance,

Florian

___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users

___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users



___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] compilation with OCaml 4.06

2018-02-22 Thread Clément David
Hello Florian,

Please find attached a patch that fix this issue; it comes from a OCaml 4.0.4 
change which
distinguish String and Bytes implementations and the unsafe-string flag.

Quoting the documentation [1]:
> OCaml strings used to be modifiable in place, for instance via the String.set 
> and String.blit
> functions described below. This usage is deprecated and only possible when 
> the compiler is put 
> in "unsafe-string" mode by giving the -unsafe-string command-line option

[1]: https://caml.inria.fr/pub/docs/manual-ocaml/libref/String.html

Regards,

--
Clément

Le jeudi 22 février 2018 à 09:35 +0100, Florian Blachère a écrit :
> Hello Clément,
> 
> Thanks for the answer, I installed num and changed the compilation line to 
> use ocamlfind but now
> the compilation fails with : 
> 
> ocamlfind ocamlopt -package num -I ./src/modelica_compiler -I 
> ./src/xml2modelica -c
> src/modelica_compiler/optimization.ml
> File "src/modelica_compiler/optimization.ml", line 166, characters 21-22:
> Error: This expression has type string but an expression was expected of type
>  bytes
> 
> Is it link to the uodate to OCaml 4.06 ?
> 
> Florian
> 
> On 21/02/18 11:51, Clément David wrote:
> > Hello Florian,
> > 
> > The easier would be to depend on the external Num library for the 6.0.x 
> > family as far as this
> > library remains available; statically build against it is the way to go for 
> > OCaml code. Num
> > might
> > also be packaged in your system, use ocamlfind to look for it.
> > 
> > Thanks,
> > 
> > --
> > Clément
> > 
> > Le mercredi 21 février 2018 à 08:41 +0100, Florian Blachère a écrit :
> > > Hello,
> > > 
> > > Scilab 6.0.0 and 6.0.1 (and the master branch) cannot be build using 
> > > OCaml 4.06 because this release remove the Num library 
> > > (https://ocaml.org/releases/4.06.html#Changes class="Apple-tab-span" 
> > > style="white-space:pre">
> > >   , 
> > > https://github.com/ocaml/ocaml/pull/1178), do you have any advice to 
> > > build Scilab with recent OCaml: integrate Num in Scilab, build Num 
> > > oustside of Scilab and link against it, ... ?
> > > 
> > > Thanks by advance,
> > > 
> > > Florian
> > > 
> > > ___
> > > users mailing list
> > > users@lists.scilab.org
> > > http://lists.scilab.org/mailman/listinfo/users
> > 
> > ___
> > users mailing list
> > users@lists.scilab.org
> > http://lists.scilab.org/mailman/listinfo/users
> 
> ___
> users mailing list
> users@lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/usersFrom 39662e94dca4d3c71ba0e7792de2d200f0ec7a08 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Cl=C3=A9ment=20DAVID?= 
Date: Mon, 27 Mar 2017 17:45:41 +0200
Subject: [PATCH] Fix build with ocaml 4.0.4

Change-Id: I962fe026f1c44f7f76435db0b4838b0d936994c8
---
 scilab/modules/scicos/Makefile.in  | 12 ++---
 scilab/modules/scicos/Makefile.modelica.am |  2 +-
 scilab/modules/scicos/src/xml2modelica/linenum.mll | 56 --
 4 files changed, 11 insertions(+), 67 deletions(-)
 delete mode 100644 scilab/modules/scicos/src/xml2modelica/linenum.mll

Index: scilab-6.0.0/modules/scicos/src/modelica_compiler/optimization.ml
===
--- scilab-6.0.0.orig/modules/scicos/src/modelica_compiler/optimization.ml
+++ scilab-6.0.0/modules/scicos/src/modelica_compiler/optimization.ml
@@ -162,7 +162,7 @@ let num_of_float f =
   let num_of_positive_float f =
 let m, e = frexp f in
 let sm = string_of_float m in
-let s = String.make 16 '0' in
+let s = Bytes.make 16 '0' in
 String.blit sm 2 s 0 (String.length sm - 2);
 let e' = Num.power_num (Num.Int 2) (Num.num_of_int e) in
 Num.div_num (Num.mult_num (Num.num_of_string s) e') scaling_factor
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] "intg" and i"ntegrate"

2018-02-22 Thread fujimoto2005
I want to integrate a user function f(x,y1,y2) from a to b with respect to x.

1, I don't see the difference between "integrate" and "intg". I saw help
file and find "integrate" can manage multi upper limits.  Except it, I can't
find any differences between two functions. Is there a difference in the
accuracy or calculation method?
 "intg" has a fixed number of partitions. Does "integrate" increase the
number of partitions automatically until the accuracy is not improved? I do
not understand the difference with the help file.
2, I could use "intg" with "intg (a, b, list (f, y1, y2))", but I could't
use "integrate" with "integrate (list ("f", y1, y2), "x", a, b)" or
"integrate (list (f, y1, y2), "x", a, b)". What is wrong with the syntax?

Best regards



--
Sent from: 
http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] image processing

2018-02-22 Thread Claus Futtrup
Hi Offer Pade

Please see : https://atoms.scilab.org/categories/image_Processing

I hope you find here what you need.

Best regards,
Claus


On Wed, Feb 21, 2018 at 8:29 AM, Offer Pade  wrote:

> I need to convert several image processing programs I have written in
> matlab, to scilab.
>
> Is there an image processing toolbox in scilab and how do I get it.
>
> Regards
>
> Offer Pade
>
> ___
> users mailing list
> users@lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users
>
>
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] SCILAB ODE solvers: bookes or notes about it.

2018-02-22 Thread Hermes

Hello colleagues,
I would like to know if there is a more recent version of the document:
*Ordinary Differential Equations with Scilab
WATS Lectures
Provisional notes
Universit'e de Saint-Louis
2004
G. Sallet *
Or if I can find the scripts of the examples developed in the document.
In the reading that I do of the document I have been developing these
examples. In some cases I get the expected results and in others I do not.

Is there any other similar document !?

Gracias



--
Sent from: 
http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users