Re: [Scilab-users] Plot issues.

2024-03-29 Thread Samuel Gougeon

Hello Rafael,

The data are recorded as 2 vectors A and B of single precision real numbers.
Unfortunately loadmatfile() is still reported (currently for 9 years) as unable 
to correctly load single precision numbers: 
https://gitlab.com/scilab/scilab/-/issues/13789

By the way, using loadmatfile() for your file .mat crashes Scilab 2023.1 and 
2024.0 on Windows 10.

Regards
Samuel

Le 28/03/2024 à 16:26, Gonzalez, Rafael a écrit :
Hello,

I am giving it a try to Scilab 2024, and I have been having some issues 
plotting data of a Matlab file and I would like to have some guidance to solve 
the problem.

When I plot the data, Scilab plot function shows an utterly wrong drawing, as 
shown below:



The MAT files are version 7. Find attached the file used for these plots. The issue may 
originate from the "loadmat" function.

The plot should be like this:



I'm using Silab in Linux Mint with Java 21.


Thank you,


Rafael A Gonzalez

Electronics Tech. University of Saskatchewan

Tel.: +1 306 966 5709

Cel.: +1 306 880 40 33



Website: https://artsandscience.usask.ca/geology/




This email and any attachments are intended solely for the use of the 
individual or entity to whom it is addressed and may be confidential and/or 
privileged.

If you are not one of the named recipients or have received this email in error,

(i) you should not read, disclose, or copy it,

(ii) please notify sender of your receipt by reply email and delete this email 
and all attachments,

(iii) Dassault Systèmes does not accept or assume any liability or 
responsibility for any use of or reliance on this email.


Please be informed that your personal data are processed according to our data 
privacy policy as described on our website. Should you have any questions 
related to personal data protection, please contact 3DS Data Protection Officer 
https://www.3ds.com/privacy-policy/contact/

___
users mailing list - users@lists.scilab.org
Click here to unsubscribe: 
https://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] how do I plot 9 curves with automatic colour sequencing?

2023-06-04 Thread Samuel Gougeon

Le 03/06/2023 à 18:17, Heinz Nabielek a écrit :

Colleagues:

[sorry, has been asked before but forgot]: how do I plot 9 curves with 
automatic colour sequencing?

o   Problem #1: colour 8 is white and I cannot see my curve
o   Problem #2: colours >= 9 become rather non distinct

Is there an easy solution without complex SciLab acrobatics?

The same topic was dealt with on 202-03-20 @ 
https://www.mail-archive.com/users@lists.scilab.org/msg11103.html

Defining a general strategy of automatic assignment of curves style is not 
necessarily trivial.
The current strategy is not the same for plot(): cycling over 7 colors ; and 
for plot2d(): scanning the current colormap

Whatever the strategy that you design and then propose and use, it will always 
have a limit.
You can't expect to have a always valid method.

The current plot() strategy could be improved for instance by cycling in a 
nested way first over line styles,
starting with solid lines as now, and then over line colors.
This would increase the limit to 7x10=70 styles, instead of currently 7.

Please feel free to open a report about the topic if you deem it is worthwhile, 
with a rationale. Any actual algorithmic proposal is also welcome.

There is no general solution, but there are easy ways to customize the curve 
styles by hand, even at calling time, without post-processing.

x = 0:.05:1;
clf reset
plot(x, sin(x'*(1:10)), "color",[1:6 13 17 28 32])// "color" option
legend(msprintf("Curve #%d\n",(1:10)'), "in_lower_left");

[cid:part1.37Mim3rA.GDIR3PW8@free.fr]



With plot2d(), you get the same figure without the legend with:

x = 0:.05:1;
clf reset
plot2d(x, sin(x'*(1:10)), [1:6 13 17 28 32])



You may also customize the colormap before calling plot2d(), without the style 
option.
The hsvcolormap is quite handy because it alternates colors:


x = 0:.05:1;
clf
gcf().color_map = hsvcolormap(11);
plot2d(x, sin(x'*(1:10)))
legend(msprintf("Curve #%d\n",(1:10)'), "in_lower_left");

[cid:part2.pmU8pSci.HfJ9HZA4@free.fr]

All these options are documented.

Regards
Samuel



This email and any attachments are intended solely for the use of the 
individual or entity to whom it is addressed and may be confidential and/or 
privileged.

If you are not one of the named recipients or have received this email in error,

(i) you should not read, disclose, or copy it,

(ii) please notify sender of your receipt by reply email and delete this email 
and all attachments,

(iii) Dassault Systèmes does not accept or assume any liability or 
responsibility for any use of or reliance on this email.


Please be informed that your personal data are processed according to our data 
privacy policy as described on our website. Should you have any questions 
related to personal data protection, please contact 3DS Data Protection Officer 
https://www.3ds.com/privacy-policy/contact/

___
users mailing list - users@lists.scilab.org
Click here to unsubscribe: 
https://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] how do I plot 9 curves with automatic colour sequencing?

2023-06-03 Thread Samuel Gougeon

Le 03/06/2023 à 18:17, Heinz Nabielek a écrit :

Colleagues:

[sorry, has been asked before but forgot]: how do I plot 9 curves with 
automatic colour sequencing?


x = 0:.05:1;
clf, plot(x, sin(x'*(1:10)))
legend(msprintf("Curve #%d\n",(1:10)'), "in_lower_left");

[cid:part1.eVriBsLU.bcQMxwT6@free.fr]




This email and any attachments are intended solely for the use of the 
individual or entity to whom it is addressed and may be confidential and/or 
privileged.

If you are not one of the named recipients or have received this email in error,

(i) you should not read, disclose, or copy it,

(ii) please notify sender of your receipt by reply email and delete this email 
and all attachments,

(iii) Dassault Systèmes does not accept or assume any liability or 
responsibility for any use of or reliance on this email.


Please be informed that your personal data are processed according to our data 
privacy policy as described on our website. Should you have any questions 
related to personal data protection, please contact 3DS Data Protection Officer 
https://www.3ds.com/privacy-policy/contact/

___
users mailing list - users@lists.scilab.org
Click here to unsubscribe: 
https://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Plotting on left and right y axes

2023-04-28 Thread Samuel Gougeon

Hello,

You may have a look to examples in

--> help plot_multiscaled

https://help.scilab.org/docs/2023.0.0/en_US/plot_multiscaled.html##L280

Best regards

Le 28/04/2023 à 18:32, Samuel Enibe a écrit :
How can I plot two graphs on the same window,  with graph 1 on the left y axis, 
 and graph 2 on the right y axis.

For example,

x = 1:4;
y1 = x.^2;
y2 = x.^3;
plot(x, y1);// y1 on left y axis
plot (x. y2);// y2 on right y axis

Your assistance will be greatly appreciated.

Samuel Enibe


This email and any attachments are intended solely for the use of the 
individual or entity to whom it is addressed and may be confidential and/or 
privileged.

If you are not one of the named recipients or have received this email in error,

(i) you should not read, disclose, or copy it,

(ii) please notify sender of your receipt by reply email and delete this email 
and all attachments,

(iii) Dassault Systèmes does not accept or assume any liability or 
responsibility for any use of or reliance on this email.


Please be informed that your personal data are processed according to our data 
privacy policy as described on our website. Should you have any questions 
related to personal data protection, please contact 3DS Data Protection Officer 
https://www.3ds.com/privacy-policy/contact/




___
users mailing list - users@lists.scilab.org
Click here to unsubscribe: 

https://lists.scilab.org/mailman/listinfo/users



This email and any attachments are intended solely for the use of the 
individual or entity to whom it is addressed and may be confidential and/or 
privileged.

If you are not one of the named recipients or have received this email in error,

(i) you should not read, disclose, or copy it,

(ii) please notify sender of your receipt by reply email and delete this email 
and all attachments,

(iii) Dassault Systèmes does not accept or assume any liability or 
responsibility for any use of or reliance on this email.


Please be informed that your personal data are processed according to our data 
privacy policy as described on our website. Should you have any questions 
related to personal data protection, please contact 3DS Data Protection Officer 
https://www.3ds.com/privacy-policy/contact/

___
users mailing list - users@lists.scilab.org
Click here to unsubscribe: 
https://lists.scilab.org/mailman/listinfo/users


[Scilab-users] Catching events from keyboard arrows: xclick?

2023-04-19 Thread Samuel Gougeon

Hello,

Does anyone know if it's possible to catch events from the keyboard arrows?
Apparently xclick() does not detect them:

clf
plot2d
while %t
   disp(xclick(%t));
end
// press keyboard arrows => nothing is displayed

By the way, according to the xclick documentation, here-above one could expect 
only one output, ibutton,

--> uman xclick ul

Scilab > Graphics > interaction > xclick

SYNTAXES
[ibutton,xcoord,yxcoord,iwin,cbmenu] = xclick([flag])

while a triplet is returned, [ibutton, xcoord, ycoord]:

--> while %t
 > disp(xclick(%t));
 > end

  3.   3.3063975   1.4608696
  4.   4.0068182   1.542029
  5.   4.0342856   1.426087

https://help.scilab.org/docs/2023.0.0/en_US/xclick.html

xclick() already behaved like this with Scilab 4.1.2 and 5.5.2.

Thanks for any info about keyboard arrows

Regards
Samuel

This email and any attachments are intended solely for the use of the 
individual or entity to whom it is addressed and may be confidential and/or 
privileged.

If you are not one of the named recipients or have received this email in error,

(i) you should not read, disclose, or copy it,

(ii) please notify sender of your receipt by reply email and delete this email 
and all attachments,

(iii) Dassault Systèmes does not accept or assume any liability or 
responsibility for any use of or reliance on this email.


Please be informed that your personal data are processed according to our data 
privacy policy as described on our website. Should you have any questions 
related to personal data protection, please contact 3DS Data Protection Officer 
https://www.3ds.com/privacy-policy/contact/

___
users mailing list - users@lists.scilab.org
Click here to unsubscribe: 
https://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] animaGIF does not work. Why?

2023-04-14 Thread Samuel Gougeon

Le 14/04/2023 à 01:00, Heinz Nabielek a écrit :

On 13.04.2023, at 20:35, Samuel Gougeon  wrote:

.../...
Installing is not loading (that's intentional).
Just after installing, without restarting Scilab, you need to load the module, 
either with atomsLoad(..), or interactively thanks to the Toolboxes console's 
menu.

Silly me. Thanks. Works, of course.
In my present coding, the movie is stored as a *.gif file. Graphics programs 
see this as stationary figure,



It depends on the software. On Windows, for instance the popular
Irfanview can display the animation. I don't know the MacOS softwares.


___
users mailing list - users@lists.scilab.org
Click here to unsubscribe: <mailto:users-unsubscr...@lists.scilab.org>
https://lists.scilab.org/mailman/listinfo/users
This email and any attachments are intended solely for the use of the 
individual or entity to whom it is addressed and may be confidential and/or 
privileged.

If you are not one of the named recipients or have received this email in error,

(i) you should not read, disclose, or copy it,

(ii) please notify sender of your receipt by reply email and delete this email 
and all attachments,

(iii) Dassault Systèmes does not accept or assume any liability or 
responsibility for any use of or reliance on this email.


Please be informed that your personal data are processed according to our data 
privacy policy as described on our website. Should you have any questions 
related to personal data protection, please contact 3DS Data Protection Officer 
https://www.3ds.com/privacy-policy/contact/



Re: [Scilab-users] x/y labels formatting

2023-04-13 Thread Samuel Gougeon

Le 08/04/2023 à 16:24, Lester Anderson a écrit :
Hello,

A quick query, how can I make the 's' in (Rs) a subscript?

Without TeX, the subscript-s has a unicode version. But it is very (too) small:

--> %chars.subsupscript
ans  =
 "₀₁₂₃₄₅₆₇₈₉₊₋₌₍ₐₕₖₗₘₙₒₚₛₜₓ₎ ⁰¹²³⁴⁵⁶⁷⁸⁹⁺⁻⁼⁽ªⁱⁿº⁾"

--> // Rₛ

xlabel 'Relative distance in Schwartzschild Radii (Rₛ)' fontname 4 fontsize 4


This email and any attachments are intended solely for the use of the 
individual or entity to whom it is addressed and may be confidential and/or 
privileged.

If you are not one of the named recipients or have received this email in error,

(i) you should not read, disclose, or copy it,

(ii) please notify sender of your receipt by reply email and delete this email 
and all attachments,

(iii) Dassault Systèmes does not accept or assume any liability or 
responsibility for any use of or reliance on this email.


Please be informed that your personal data are processed according to our data 
privacy policy as described on our website. Should you have any questions 
related to personal data protection, please contact 3DS Data Protection Officer 
https://www.3ds.com/privacy-policy/contact/

___
users mailing list - users@lists.scilab.org
Click here to unsubscribe: 
https://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Scilab 2023.0.0, Win10

2023-04-13 Thread Samuel Gougeon

Hello,

Le 13/04/2023 à 14:19, SCHULZ Wolfgang a écrit :
Hello,
I just tested a Scilab script what I’m using for a long time.
It contains the input function and it seems it is not working anymore.

Yes, it suffers from a new bug in 
2023.0.0: the message is not 
printed. This bug is already corrected for the next release 2023.1 (may 2023).

Also the examples in the help are commented.

It is weird, indeed. I was not able to find in the history of the example any 
rationale about why it has been commented.
It was already the case in Scilab 4.1.2 (2007), and maybe even before.

We could propose to make the example executable, as well as new examples as for 
instance
when inputing the name of a variable.

Does that mean this function will be skipped in the future?
Definitely not

Regards
Samuel


This email and any attachments are intended solely for the use of the 
individual or entity to whom it is addressed and may be confidential and/or 
privileged.

If you are not one of the named recipients or have received this email in error,

(i) you should not read, disclose, or copy it,

(ii) please notify sender of your receipt by reply email and delete this email 
and all attachments,

(iii) Dassault Systèmes does not accept or assume any liability or 
responsibility for any use of or reliance on this email.


Please be informed that your personal data are processed according to our data 
privacy policy as described on our website. Should you have any questions 
related to personal data protection, please contact 3DS Data Protection Officer 
https://www.3ds.com/privacy-policy/contact/

___
users mailing list - users@lists.scilab.org
Click here to unsubscribe: 
https://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] animaGIF does not work. Why?

2023-04-13 Thread Samuel Gougeon

Le 13/04/2023 à 04:59, Heinz Nabielek a écrit :

Colleagues:

animaGIF is loaded


--> atomsInstall('animaGIF');
 animaGIF (1.0) is already installed in the 'allusers' section and 
up-to-date



but does not work


--> idGif = animaGIF(gcf(), outgif, 1,2);
Undefined variable: animaGIF

Why?
Heinz



Installing is not loading (that's intentional).
Just after installing, without restarting Scilab, you need to load the module, 
either with atomsLoad(..), or interactively thanks to the Toolboxes console's 
menu.

Samuel


This email and any attachments are intended solely for the use of the 
individual or entity to whom it is addressed and may be confidential and/or 
privileged.

If you are not one of the named recipients or have received this email in error,

(i) you should not read, disclose, or copy it,

(ii) please notify sender of your receipt by reply email and delete this email 
and all attachments,

(iii) Dassault Systèmes does not accept or assume any liability or 
responsibility for any use of or reliance on this email.


Please be informed that your personal data are processed according to our data 
privacy policy as described on our website. Should you have any questions 
related to personal data protection, please contact 3DS Data Protection Officer 
https://www.3ds.com/privacy-policy/contact/

___
users mailing list - users@lists.scilab.org
Click here to unsubscribe: 
https://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Random polyline colours and polyline segments

2023-03-29 Thread Samuel Gougeon

Le 28/03/2023 à 14:17, Lester Anderson a écrit :
Hello,

I am revisiting the Collatz plots

still very nice :-)


and wondered how one can (a) randomise the polyline colours and (b) colour the 
polyline segments from first to last segment given a range of start-to-end 
colours?


For b), xsegs() does it. As an example you may try

n = 100;
x = linspace(0,10, n);
y = x + sin(x);
// polyline => set of segments
xs = [x(1,1:$-1) ; x(1,2:$)];
ys = [y(1,1:$-1) ; y(1,2:$)];

gcf().color_map = jetcolormap(n);
plot(x,y); delete(gce()) // to get the axes frame
xsegs(xs, ys, 1:n-1)

gce().thickness = 4;
xgrid(color("grey70"))

[cid:part1.78w85CoS.V0ZsyuYy@free.fr]



Best regards
Samuel

This email and any attachments are intended solely for the use of the 
individual or entity to whom it is addressed and may be confidential and/or 
privileged.

If you are not one of the named recipients or have received this email in error,

(i) you should not read, disclose, or copy it,

(ii) please notify sender of your receipt by reply email and delete this email 
and all attachments,

(iii) Dassault Systèmes does not accept or assume any liability or 
responsibility for any use of or reliance on this email.


Please be informed that your personal data are processed according to our data 
privacy policy as described on our website. Should you have any questions 
related to personal data protection, please contact 3DS Data Protection Officer 
https://www.3ds.com/privacy-policy/contact/

___
users mailing list - users@lists.scilab.org
Click here to unsubscribe: 
https://lists.scilab.org/mailman/listinfo/users


[Scilab-users] uman 3.2 is released

2023-03-28 Thread Samuel Gougeon

Hello everyone,

The uman 3.2 (user manual) module is released and available for Scilab 6.0, 6.1 
and 2023.0 (and forthcoming Scilab versions :-)

Newcomers may find  a presentation of uman() @ 
https://atoms.scilab.org/toolboxes/uman

This version works with the new Scilab's environment :

 *   uman 3.1 was broken for Scilab 2023.0. uman 3.2 restores it.

 *   uman item b
still lists bugs related to the item. From the Scilab console, it addresses the 
new (and right) Scilab bug tracker
*   For Scilab items : https://gitlab.com/scilab/scilab/-/issues
*   For items of packages on the forges : 
https://gitlab.com/groups/scilab/forge/-/issues

Please note that the performances of the Gitlab search engines are much poorer 
than with the former Bugzilla bug tracker. uman_b features and help page have 
been updated accordingly.

 *   uman item w
still addresses help pages on the web. It will be even more useful than before 
Scilab's migration. Indeed, IMHO, the new search engine  @ 
https://help.scilab.org is far less accurate than before the migration.
uman .. w  has unchanged performances.

 *   uman item @s
is now available. After @ and @d, this one digs on Stackoverflow about Scilab 
and the given item.
Performances are lower than when digging in users@ and dev@ mailing lists, 
because Stackoverflow search engine is much poorer, and because the number of 
available discussion threads is way smaller.

 *   45 new references are added: removed functions, redirections, etc

 *   1 bug fixed: using a variable named String in the session killed uman :-/

Some uman() features were added to the help browser in Scilab 6.1.1 :

Scilab 6.1.0 :
[cid:part1.QHqzhgRn.gFhVCpXT@free.fr]   Scilab 6.1.1 :
[cid:part2.l97Koycu.GX2tdmM0@free.fr]

and in preferences. uman() still goes beyond.

Best regards
Samuel Gougeon

--

CHANGES : https://atoms.scilab.org/toolboxes/uman/3.2/files/changelog.txt

USER MANUAL (PDF)
-
English : https://atoms.scilab.org/toolboxes/uman/3.2/files/uman_3.2_en.pdf
Français: https://atoms.scilab.org/toolboxes/uman/3.2/files/uman_3.2_fr.pdf

COMMENTS & BUG REPORTS: https://atoms.scilab.org/toolboxes/uman


SYNTAXES

uman   — User manual in console, online, or help browser, with
  language switch and related bugs & messages.
uman .. g  — Displays the item's documentation in the help browser.
uman .. @  — Selects informations from Scilab mailing lists.
uman .. w  — Shows the online help page or the reference web page
  of an item.
uman .. b  — Shows bugs reported on Scilab bugzilla or forge bugs
 trackers, or as ATOMS comments
disp_usage — Displays allowed syntaxes to call a given function.




This email and any attachments are intended solely for the use of the 
individual or entity to whom it is addressed and may be confidential and/or 
privileged.

If you are not one of the named recipients or have received this email in error,

(i) you should not read, disclose, or copy it,

(ii) please notify sender of your receipt by reply email and delete this email 
and all attachments,

(iii) Dassault Systèmes does not accept or assume any liability or 
responsibility for any use of or reliance on this email.


Please be informed that your personal data are processed according to our data 
privacy policy as described on our website. Should you have any questions 
related to personal data protection, please contact 3DS Data Protection Officer 
https://www.3ds.com/privacy-policy/contact/

___
users mailing list - users@lists.scilab.org
Click here to unsubscribe: <mailto:users-unsubscr...@lists.scilab.org>
https://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] robust boxplot within scilab

2023-03-20 Thread Samuel Gougeon

Le 07/10/2014 à 07:33, A Khorshidi a écrit :

.../...
Hello;

Did you try nan_boxplot() which comes with the NaN toolbox:
https://atoms.scilab.org/toolboxes/nan

Also there is another function named boxplot() form CASCI toolbox but this
toolbox should be modified to run correctly with newer version of Scilab
(e.g. sort() must be replaced by gsort()).
https://atoms.scilab.org/toolboxes/casci


This should be fixed now in the CASCI 1.1.0 release.
For any other issues, do not hesitate to report them @
https://gitlab.com/scilab/forge/casci/-/issues

Samuel

___
users mailing list - users@lists.scilab.org
Click here to unsubscribe: 
https://lists.scilab.org/mailman/listinfo/users
This email and any attachments are intended solely for the use of the 
individual or entity to whom it is addressed and may be confidential and/or 
privileged.

If you are not one of the named recipients or have received this email in error,

(i) you should not read, disclose, or copy it,

(ii) please notify sender of your receipt by reply email and delete this email 
and all attachments,

(iii) Dassault Systèmes does not accept or assume any liability or 
responsibility for any use of or reliance on this email.


Please be informed that your personal data are processed according to our data 
privacy policy as described on our website. Should you have any questions 
related to personal data protection, please contact 3DS Data Protection Officer 
https://www.3ds.com/privacy-policy/contact/



Re: [Scilab-users] 1. Re: cdfchi=cumulative distribution function chi-square distribution (Dang Ngoc Chan, Christophe)

2023-03-20 Thread Samuel Gougeon

Hello Heinz,

Le 10/02/2023 à 13:08, Heinz Nabielek a écrit :

On 10.02.2023, at 09:22, Dang Ngoc Chan, Christophe 
 wrote:

.../..
But: why does it have to be so difficult for an experimental physicist when 
trying to assess the uncertainties of low numbers?


The CASCI pakages provides several functions computing confidence intervals:

CONFIDENCE INTERVALS :
intbinomial - binomial confidence interval
intexponential - exponential confidence interval
intnormalm - normal confidence interval for μ
intnormals - normal confidence interval for σ
intpoisson - Poisson confidence interval


You may have a look to them:
https://atoms.scilab.org/toolboxes/casci
https://atoms.scilab.org/toolboxes/casci/1.1.0/files/casci_user_manual.pdf

Regards
Samuel


This email and any attachments are intended solely for the use of the 
individual or entity to whom it is addressed and may be confidential and/or 
privileged.

If you are not one of the named recipients or have received this email in error,

(i) you should not read, disclose, or copy it,

(ii) please notify sender of your receipt by reply email and delete this email 
and all attachments,

(iii) Dassault Systèmes does not accept or assume any liability or 
responsibility for any use of or reliance on this email.


Please be informed that your personal data are processed according to our data 
privacy policy as described on our website. Should you have any questions 
related to personal data protection, please contact 3DS Data Protection Officer 
https://www.3ds.com/privacy-policy/contact/

___
users mailing list - users@lists.scilab.org
Click here to unsubscribe: 
https://lists.scilab.org/mailman/listinfo/users


[Scilab-users] Statistics & probability CASCI module is back in ATOMS

2023-03-20 Thread Samuel Gougeon

Dear all,

CASCI is an external package 
gathering 178 functions for statistics and probability computing.
The Table of contents of its documentation (complete although only in PDF) can be 
seen on its ATOMS page.

This package was published in ATOMS up to Scilab 5.5, but was never ported to 
Scilab 6.

CASCI is now available for recent 6.0, 6.1, and 2023.0 Scilab versions, and 
forthcoming ones.

To install it, please first update the list of packages that your ATOMS manager 
sees:
--> atomsSystemUpdate()
Then
--> atomsInstall casci  // or interactively with atomsGui()

Comments about the package can still be posted on its ATOMS page.

Issues can be reported on its dedicated forge @ 
https://gitlab.com/scilab/forge/casci/-/issues

Best regards
Samuel


PS: Volunteers that would aim to contribute improving Scilab and its packages 
are welcome
to work to CASCI,

 *   to convert its PDF documentation in the Scilab format. This will make 
pages browseable in the native Scilab help browser. This work does not require 
at all to understand what functions do.

 *   to write some unitary tests, to improve the package's maintainability 
accross Scilab versions

If you are interested, please get in touch with me. I will provide some 
guidelines (in french or english) to ease your contribution and work. Thank you.


This email and any attachments are intended solely for the use of the 
individual or entity to whom it is addressed and may be confidential and/or 
privileged.

If you are not one of the named recipients or have received this email in error,

(i) you should not read, disclose, or copy it,

(ii) please notify sender of your receipt by reply email and delete this email 
and all attachments,

(iii) Dassault Systèmes does not accept or assume any liability or 
responsibility for any use of or reliance on this email.


Please be informed that your personal data are processed according to our data 
privacy policy as described on our website. Should you have any questions 
related to personal data protection, please contact 3DS Data Protection Officer 
https://www.3ds.com/privacy-policy/contact/

___
users mailing list - users@lists.scilab.org
Click here to unsubscribe: 
https://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Generic plot command draws automatically _which_ coloured curves

2023-03-20 Thread Samuel Gougeon

Le 20/03/2023 à 13:13, Heinz Nabielek a écrit :

size(E4)=   81.   1.
size(D) =81.   7.
plot (E4,D,'-')

This generic plot command draws automatically coloured curves in blue, green, 
red, etcetera

What are the following colours? I know that 8 is white


getcolor() tells it to you, in the infobar for the selected color:

[cid:part1.LqMLl9Rl.GuGn90eB@free.fr]


--> c = gdf().color_map; [(1:size(c,1))', c]
ans  =

  1.0.  0.  0.
  2.0.  0.  1.
  3.0.  1.  0.
  4.0.  1.  1.
  5.1.  0.  0.
  6.1.  0.  1.
  7.1.  1.  0.
  8.1.  1.  1.
  9.0.  0.  0.5647059
  10.   0.  0.  0.6901961
  11.   0.  0.  0.8156863
  12.   0.5294118   0.8078431   1.
  13.   0.  0.5647059   0.
  14.   0.  0.6901961   0.
  15.   0.  0.8156863   0.
  16.   0.  0.5647059   0.5647059
  17.   0.  0.6901961   0.6901961
  18.   0.  0.8156863   0.8156863
  19.   0.5647059   0.  0.
  20.   0.6901961   0.  0.
  21.   0.8156863   0.  0.
  22.   0.5647059   0.  0.5647059
  23.   0.6901961   0.  0.6901961
  24.   0.8156863   0.  0.8156863
  25.   0.5019608   0.1882353   0.
  26.   0.6274510.2509804   0.
  27.   0.7529412   0.3764706   0.
  28.   1.  0.5019608   0.5019608
  29.   1.  0.6274510.627451
  30.   1.  0.7529412   0.7529412
  31.   1.  0.8784314   0.8784314
  32.   1.  0.8431373   0.


Samuel


This email and any attachments are intended solely for the use of the 
individual or entity to whom it is addressed and may be confidential and/or 
privileged.

If you are not one of the named recipients or have received this email in error,

(i) you should not read, disclose, or copy it,

(ii) please notify sender of your receipt by reply email and delete this email 
and all attachments,

(iii) Dassault Systèmes does not accept or assume any liability or 
responsibility for any use of or reliance on this email.


Please be informed that your personal data are processed according to our data 
privacy policy as described on our website. Should you have any questions 
related to personal data protection, please contact 3DS Data Protection Officer 
https://www.3ds.com/privacy-policy/contact/

___
users mailing list - users@lists.scilab.org
Click here to unsubscribe: 
https://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Arrow on line from (x1, y1) to (x2, y2)

2023-03-06 Thread Samuel Gougeon

Hello,

Do you mean that the arrow links (x1,y1) to (x2,y2),
or that you draw a segment from (x1,y1) to (x2,y2) and then plug an
arrow starting on it (where (x3,y3)?) and going outside (where (x4,y4)?) ?


Le 06/03/2023 à 18:53, Samuel Enibe a écrit :

I need to attach an arrow to a line pointing from (x1, y1) to (x2, y2).

How can this be done?

Your assistance will be greatly appreciated.

Samuel Enibe


___
users mailing list - users@lists.scilab.org
Click here to unsubscribe: 
https://lists.scilab.org/mailman/listinfo/users
This email and any attachments are intended solely for the use of the 
individual or entity to whom it is addressed and may be confidential and/or 
privileged.

If you are not one of the named recipients or have received this email in error,

(i) you should not read, disclose, or copy it,

(ii) please notify sender of your receipt by reply email and delete this email 
and all attachments,

(iii) Dassault Systèmes does not accept or assume any liability or 
responsibility for any use of or reliance on this email.


Please be informed that your personal data are processed according to our data 
privacy policy as described on our website. Should you have any questions 
related to personal data protection, please contact 3DS Data Protection Officer 
https://www.3ds.com/privacy-policy/contact/



Re: [Scilab-users] plot and subplot bug for low values?

2023-03-03 Thread Samuel Gougeon

Hello Jean-Yves,

Le 03/03/2023 à 16:19, Jean-Yves Baudais a écrit :

Hello,

The following code gives strange results (Scilab version
"6.1.1.1626343451", on Ubuntu 22.04)

subplot(212),plot(1e-8*rand(1,5))

the y-axis and the y_ticks are not only limited to the subplot! The same
appends with full plot (without subplot) and there exist y_ticks above
the graphic window.

Is it a bug with low value?



This issue was reported 4 years ago, was fixed 8 months ago, and so will
no longer occur in the forthcoming release.

Regards
Samuel

___
users mailing list - users@lists.scilab.org
Click here to unsubscribe: 
https://lists.scilab.org/mailman/listinfo/users
This email and any attachments are intended solely for the use of the 
individual or entity to whom it is addressed and may be confidential and/or 
privileged.

If you are not one of the named recipients or have received this email in error,

(i) you should not read, disclose, or copy it,

(ii) please notify sender of your receipt by reply email and delete this email 
and all attachments,

(iii) Dassault Systèmes does not accept or assume any liability or 
responsibility for any use of or reliance on this email.


Please be informed that your personal data are processed according to our data 
privacy policy as described on our website. Should you have any questions 
related to personal data protection, please contact 3DS Data Protection Officer 
https://www.3ds.com/privacy-policy/contact/



Re: [Scilab-users] Can I program a table into a diagram?

2023-02-27 Thread Samuel Gougeon

Hello Heinz,

Le 25/02/2023 à 00:13, Heinz Nabielek a écrit :
Colleagues:

can I program a table like below into a Scilab generated diagram?

Sending some HTML-ized code to xstring() would have been the more versatile and 
tunable way to proceed, to get a styled table, with colored backgrounds, etc. 
Unfortunately, unlike for the GUI, xstring() does not interpret HTML and 
renders it as is.

The first actual way might be to use an editable uitable (uicontrol 
style="table") in a figure.
Then you will need gui2bitmap to 
export the figure as an image, including the uitable, and cells won't be filled with 
individual background colors.


The second way might be to use a LaTeX table,
that can be prepared with 
prettyprint(), then 
be a bit customized, and finally be sent to xstring():

mytab = ["Turbine Power" "Turbine hub height" "Turbine radius";
"7 MW" "100 m" "82 m";
"12 MW" "150 m" "110 m";
"2 MW" "70 m" "40 m"];
Lat = prettyprint(mytab,,"");   // "" is to remove overall parentheses
Lat = strsubst(Lat, "${", "$\large{");
clf, xstring(0.1, 0.1, Lat)


[cid:part1.SxVGIIDw.TF4Le16q@free.fr]

You can tune the size of the text rendered in the table by changing \large into 
\Large or \LARGE etc.
You can add some row and column  frames by switching to a {tabular} object 
instead of a {matrix} one:

mytab = ["Turbine Power" "Turbine hub height" "Turbine radius"
"7 MW" "100 m" "82 m"
"12 MW" "150 m" "110 m"
"2 MW" "70 m" "40 m"];
Lat = prettyprint(mytab,,"");   // "" is to remove overall parentheses
Lat = strsubst(Lat, "${", "$\large{");
Lat = strsubst(Lat, "begin{matrix}", "begin{tabular}{|c|c|c|}\hline");
Lat = strsubst(Lat, "end{matrix}", "end{tabular}");
Lat = strsubst(Lat, "\cr", "\cr\hline");

I have not found any trivial direct way to split titles on 2 rows in cells:
since strsubst() does not handle groups 
replacement,  the Lat string 
can be processed by hand:
In it, you may replace "Turbine Power" with "\substack{Turbine\\Power}", etc. 
Then you get a string rendered as

[cid:part2.0OpHeCHn.5rotaSG1@free.fr]

... that you can pass to xstring().

Regards
Samuel

PS : Since in the figure you get the displayed legend is quite tall, it might be 
worth to try the mc_legends() 
macro available in the 
FileExchange, to get a 2-column legend.

PS2:  IMHO, prettyprint() would deserve getting more LaTeX-related options, to 
output a matrix through the {tabular} environment instead of the {matrix} one, 
to pass some {|c|l|c...} justification and border options, \hline options, 
process in-cell line breaks, etc.

This email and any attachments are intended solely for the use of the 
individual or entity to whom it is addressed and may be confidential and/or 
privileged.

If you are not one of the named recipients or have received this email in error,

(i) you should not read, disclose, or copy it,

(ii) please notify sender of your receipt by reply email and delete this email 
and all attachments,

(iii) Dassault Systèmes does not accept or assume any liability or 
responsibility for any use of or reliance on this email.


Please be informed that your personal data are processed according to our data 
privacy policy as described on our website. Should you have any questions 
related to personal data protection, please contact 3DS Data Protection Officer 
https://www.3ds.com/privacy-policy/contact/

___
users mailing list - users@lists.scilab.org
Click here to unsubscribe: 
https://lists.scilab.org/mailman/listinfo/users


[Scilab-users] unexpected syntax errors

2023-02-27 Thread Samuel Gougeon

Hello,

In Scilab 6.1.1
--> uman netcdf @
--> uman netcdf &

work as expected,
while in the nightly built version scilab-branch-6.1-7fc2e691
some syntax errors are yielded :

--> uman netcdf @
uman netcdf @
   ^^
Error : syntax error, unexpected ~ or @, expecting end of file

--> uman netcdf &
uman netcdf &
   ^^
Error: syntax error, unexpected &, expecting end of file

What is going on?

Samuel


This email and any attachments are intended solely for the use of the 
individual or entity to whom it is addressed and may be confidential and/or 
privileged.

If you are not one of the named recipients or have received this email in error,

(i) you should not read, disclose, or copy it,

(ii) please notify sender of your receipt by reply email and delete this email 
and all attachments,

(iii) Dassault Systèmes does not accept or assume any liability or 
responsibility for any use of or reliance on this email.


Please be informed that your personal data are processed according to our data 
privacy policy as described on our website. Should you have any questions 
related to personal data protection, please contact 3DS Data Protection Officer 
https://www.3ds.com/privacy-policy/contact/

___
users mailing list - users@lists.scilab.org
Click here to unsubscribe: 
https://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Scilab releases schedule / End of Windows 32-bit support

2023-02-24 Thread Samuel Gougeon

Hello,

Le 16/02/2023 à 16:42, COUVERT Vincent a écrit :
Hi all,

Scilab operational team and contributors are working hard on next release of 
Scilab that will be available in the next weeks.

In the future, we will follow a new 6-month release schedule and use a new 
release numbering system X.Y.Z based on years:
-2023.0.0 very soon (as we did not release a version in October 2022)
-2023.1.0 in May 2023
-2024.0.0 in October 2023
-2024.1.0 in May 2024
-And so on…


That's great to know that opportunities to add extensions of existing features 
or new features will be reviewed much more frequently. I asked for this through 
this mailing list for years now. So i applause.

About numbering of so-called major versions: the only critics i could address 
is the shift in year for october releases. Numbering 2024 a release published 
in 2023 looks cryptic to me. Otherwise, i see two main advantages for this 
proposal:

 *   year-based numbers are clearly user oriented. M.m.p stuff is from devs and 
mainly for devs. While having a unique referential -- since the gregorian 
calendar spread over the planet (it made more than 300 years to be the case..) 
- is for everyone and for everything. I was not really aware that year-based 
numbers is the preference of more and more commercial enterprises. They know 
that their business relies first on their users / customers. Unfortunately, 
this is less clear in the open source domain. And that's a pity.
Now, for Scilab, obsolescences and forthcoming features will be announced in 
advance in release notes and in the related documentation directly with the 
targeted year. No need to make some uncertain hypotheses about the rate of 
forthcoming releases and their type patch or minor. The announced year will 
tell it directly, and will be clear, as a countdown, with no double numbering.

 *   Because of this shared and directly visible time referential, a year-based 
index should improves interoperability.
*   Interoperability with other softwares : when we want to import an excel 
file in Scilab, then the year of the excel format matters. Reversely, if 
someone wants to call Scilab in some external environment, the Scilab Major 
year could matter as well, and will be more easily tested as a number than as a 
string.
*   Interoperability between Scilab and ATOMS external modules, whose 
numbering could also be addressed. The versioning and maintenance of ATOMS 
modules is a major topic by its own.

As the author of the module named removed, that aims to gather all pages of all 
former removed functions and features, and that lists them by Scilab version 
numbers where they could be used the last time, i can say that doing this list 
shown that neither releases notes, nor obsolescence announced (or not) in the 
documentation pages were up to now fully reliable. For instance a subset of 
functions was removed in Scilab 6.0.0 without any announcement. Sometimes there 
were removals not at the announced version. Sometimes some obsolescence and 
removed are announced but are not done (and the announce is not updated). 
Sometimes the code is removed, but not the related help pages! Still in 6.1.1, 
try

--> help isequalbitwise // you get the page
--> isequalbitwise
Undefined variable: isequalbitwise
The function was removed in 6.0.0. The discrepancy between the available page 
for no remaining function was reported very soon after 6.0.0. But for 5 years, 
nothing was done to clarify this.

After working --sometimes hard -- for Scilab for more than 8 years now, i can 
say that i am sure that this kind of thing is definitely not related to how 
releases are numbered, but how the Scilab forge is managed.

Best regards
Samuel


Minor versions will be released as needed between these planned versions and 
will only contain “hot fixes” with no new features, no function prototype 
change, …
Releasing Scilab X.2.Z will probably never happen but remains possible.

Since we no more have hardware resources to validate it, we will not release a 
32-bit version of future Scilab releases for Windows (Linux 32-bit versions are 
no more available since Scilab 6.0.0).

Best regards,
Scilab operational team



This email and any attachments are intended solely for the use of the 
individual or entity to whom it is addressed and may be confidential and/or 
privileged.

If you are not one of the named recipients or have received this email in error,

(i) you should not read, disclose, or copy it,

(ii) please notify sender of your receipt by reply email and delete this email 
and all attachments,

(iii) Dassault Systèmes does not accept or assume any liability or 
responsibility for any use of or reliance on this email.


Please be informed that your personal data are processed according to our data 
privacy policy as described on our website. Should you have any questions 
related to personal data protection, please contact 3DS Data Protection Officer 

Re: [Scilab-users] how to convert a scilab 2.5.5 into a 2.6.x script

2023-02-21 Thread Samuel Gougeon

Le 20/02/2023 à 19:41, Wolfgang Engelmann a écrit :


Am 20.02.23 um 19:31 schrieb Wolfgang Engelmann:
.../...
ps *** not in the left upper part, but at the right. The text "gain 1"
was below the clock symbol which contains "text" instead of "gain 1"

Aaarr. I see it as well.
But when i open your file with Scilab 5.5.2 with which you say you have created 
it,
here is what i see:
[cid:part1.18wpg5Fs.uI39smYn@free.fr]

Which Scilab version do you prefer?

Samuel


This email and any attachments are intended solely for the use of the 
individual or entity to whom it is addressed and may be confidential and/or 
privileged.

If you are not one of the named recipients or have received this email in error,

(i) you should not read, disclose, or copy it,

(ii) please notify sender of your receipt by reply email and delete this email 
and all attachments,

(iii) Dassault Systèmes does not accept or assume any liability or 
responsibility for any use of or reliance on this email.


Please be informed that your personal data are processed according to our data 
privacy policy as described on our website. Should you have any questions 
related to personal data protection, please contact 3DS Data Protection Officer 
https://www.3ds.com/privacy-policy/contact/

___
users mailing list - users@lists.scilab.org
Click here to unsubscribe: 
https://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] how to convert a scilab 2.5.5 into a 2.6.x script

2023-02-21 Thread Samuel Gougeon

Hello Wolfgang

Le 20/02/2023 à 19:31, Wolfgang Engelmann a écrit :
Hallo, Samuel,

sorry, I was talking about 5.5.2 and 6.1.0

I did not receive the previous answer, but was told that I was not
subscribed to the list. Thanks to whoever managed to get me into the list.

I include a zcos file which was produced with Scilab 5.5.2
If opened with 6.1.0 a short text is shown in the left upper part
outside the actual model. This happens with other zcos files produced
with 5.5.2


Here is what i see when opening the file in 6.1.0 or 6.1.1 on Windows 10 :
nothing special appears on the upper left part of the diagram:

[cid:part1.GAOXj0Wn.ELOQIM2V@free.fr]

If you report on https://gitlab.com/scilab/scilab/-/issues  the issue you 
encounter,
please include to your report a screenshot of the issue, as it is displayed for 
you.

Regards
Samuel


This email and any attachments are intended solely for the use of the 
individual or entity to whom it is addressed and may be confidential and/or 
privileged.

If you are not one of the named recipients or have received this email in error,

(i) you should not read, disclose, or copy it,

(ii) please notify sender of your receipt by reply email and delete this email 
and all attachments,

(iii) Dassault Systèmes does not accept or assume any liability or 
responsibility for any use of or reliance on this email.


Please be informed that your personal data are processed according to our data 
privacy policy as described on our website. Should you have any questions 
related to personal data protection, please contact 3DS Data Protection Officer 
https://www.3ds.com/privacy-policy/contact/

___
users mailing list - users@lists.scilab.org
Click here to unsubscribe: 
https://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Scilab releases schedule / End of Windows 32-bit support

2023-02-21 Thread Samuel Gougeon

Hello Vincent,

Le 16/02/2023 à 16:42, COUVERT Vincent a écrit :
Hi all,

Scilab operational team and contributors are working hard on next release of 
Scilab that will be available in the next weeks.

In the future, we will follow a new 6-month release schedule and use a new 
release numbering system X.Y.Z based on years:
-2023.0.0 very soon (as we did not release a version in October 2022)
-2023.1.0 in May 2023
-2024.0.0 in October 2023
-2024.1.0 in May 2024
-And so on…

Minor versions will be released as needed between these planned versions and 
will only contain “hot fixes” with no new features, no function prototype 
change, …
Releasing Scilab X.2.Z will probably never happen but remains possible.

For clarity, and according to the usual Major.minor.patch  terminology, i guess 
that you mean


Minor Patch versions will be released as needed between these planned versions 
and will only contain “hot fixes” with no new features, no function prototype 
change, …


Don't you ?

Samuel


This email and any attachments are intended solely for the use of the 
individual or entity to whom it is addressed and may be confidential and/or 
privileged.

If you are not one of the named recipients or have received this email in error,

(i) you should not read, disclose, or copy it,

(ii) please notify sender of your receipt by reply email and delete this email 
and all attachments,

(iii) Dassault Systèmes does not accept or assume any liability or 
responsibility for any use of or reliance on this email.


Please be informed that your personal data are processed according to our data 
privacy policy as described on our website. Should you have any questions 
related to personal data protection, please contact 3DS Data Protection Officer 
https://www.3ds.com/privacy-policy/contact/

___
users mailing list - users@lists.scilab.org
Click here to unsubscribe: 
https://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] The trajectory of a vector sequence

2023-02-20 Thread Samuel Gougeon

Hello,

Could you check the param3d() function ?
https://help.scilab.org/docs/6.1.1/en_US/param3d.html

x = 0:0.1:4;
y = (x-2).^2;
clf

param3d(x',y',y')

gca().rotation_angles = [60 -60];
set(gce(), "fill_mode","on", "background",color("cyan"))

[cid:part1.KrHaYv5t.sL7d7RpE@free.fr]

Samuel

Le 18/02/2023 à 21:03, 藤本記事 a écrit :
Please tell me how to draw the trajectory of a vector sequence {x(t), 
1<=t<=115} of 3-dimensional row vectors in 3-dimensional space using scilab.
The formula for x(t) is complex, so I store the result of the calculation in a 
115 x 3-dimensional matrix x_M.
x_M(t,:) means x(t).
The command below will create a graph enclosed by a line connecting x_M(1,:) 
and x_M(115,:).
I don't know what to use, if it is correct to use something other than plot3d.
plot3d(x_M(:1),x_M(:,2),x_M(:,3),leg="x1@x2@x3")


This email and any attachments are intended solely for the use of the 
individual or entity to whom it is addressed and may be confidential and/or 
privileged.

If you are not one of the named recipients or have received this email in error,

(i) you should not read, disclose, or copy it,

(ii) please notify sender of your receipt by reply email and delete this email 
and all attachments,

(iii) Dassault Systèmes does not accept or assume any liability or 
responsibility for any use of or reliance on this email.


Please be informed that your personal data are processed according to our data 
privacy policy as described on our website. Should you have any questions 
related to personal data protection, please contact 3DS Data Protection Officer 
https://www.3ds.com/privacy-policy/contact/

___
users mailing list - users@lists.scilab.org
Click here to unsubscribe: 
https://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] how to convert a scilab 2.5.5 into a 2.6.x script

2023-02-13 Thread Samuel Gougeon

Hello Wolfgang,

You may use the so-called removed external module. To install it (the first 
time), and load it:
--> atomsInstall removed
--> atomsLoad removed

Then to enter its help:
--> help removed

It starts with Scilab 4.1.2 > 2.5.5, but it should already help you.
I don't know how to retrieve the documentation for features possibly removed or 
changed from 2.5.5 to 4.1.2, if any.
If someone knows, i could include related pages for a future release of the 
removed module.

In addition, you can use the slint() function available in Scilab 6.

From its output displayed in the console, you may do CTRL+F, and in the 
console's search bar, enter 00022 (with leading zeros): it's the code for 
deprecated functions.

Then in each of your scripts, process the lines indicated by slint, using the 
removed documentation. The replacement of removed or changed features is 
usually indicated in the History section at the bottom of the pages, or/and at 
the beginning of the Description section.

Regards
Samuel

Le 10/02/2023 à 09:29, Wolfgang Engelmann a écrit :
I am new here and hope it is the adequate place to ask this question:

I have a number of scilab 2.5.5 scripts which, if run under 2.6.1,
produce outputs with errors (e.g. changing the text under items leads to
the text being somewhere outside the model).

What can be done in this case?

I use Scilab 6.1.0 and Debian 5.10.162-1
and could supply an example if wanted/appropriate

Wolfgang
___
users mailing list - users@lists.scilab.org
Click here to unsubscribe: 

https://lists.scilab.org/mailman/listinfo/users
This email and any attachments are intended solely for the use of the 
individual or entity to whom it is addressed and may be confidential and/or 
privileged.

If you are not one of the named recipients or have received this email in error,

(i) you should not read, disclose, or copy it,

(ii) please notify sender of your receipt by reply email and delete this email 
and all attachments,

(iii) Dassault Systèmes does not accept or assume any liability or 
responsibility for any use of or reliance on this email.


Please be informed that your personal data are processed according to our data 
privacy policy as described on our website. Should you have any questions 
related to personal data protection, please contact 3DS Data Protection Officer 
https://www.3ds.com/privacy-policy/contact/



This email and any attachments are intended solely for the use of the 
individual or entity to whom it is addressed and may be confidential and/or 
privileged.

If you are not one of the named recipients or have received this email in error,

(i) you should not read, disclose, or copy it,

(ii) please notify sender of your receipt by reply email and delete this email 
and all attachments,

(iii) Dassault Systèmes does not accept or assume any liability or 
responsibility for any use of or reliance on this email.


Please be informed that your personal data are processed according to our data 
privacy policy as described on our website. Should you have any questions 
related to personal data protection, please contact 3DS Data Protection Officer 
https://www.3ds.com/privacy-policy/contact/

___
users mailing list - users@lists.scilab.org
Click here to unsubscribe: 
https://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Problems with Scilab routine "conv"

2023-02-03 Thread Samuel Gougeon

Le 03/02/2023 à 21:25, Samuel Gougeon a écrit :
Le 03/02/2023 à 20:57, Samuel Gougeon a écrit :
.../...
Here is a draft proposal:
1) build the (let's say row) vector A = (dPHI/dt) of sampled data at
sampled values t
2) build the row vector B = f(-t) of sample data at t values
3) build the matrix C of (padded) A and the matrix D of (shiffted and
padded) D = B(T-t), with T as multiples of the dt step
   Each row of C and D corresponds to a T value.
4) compute E = (C .* D)*dt  when dt is the time step.
5) Set to zero all elements on (#) and above the diagonal of E.
   That's to cancel elements with t>T, to code the upper bound T of
the integral.
5) sum E along rows  (the actual integration. You can refine with a
trapeze method).

and that's it: the resulting column vector is your F(T).


As you know the formal expressions of f() and of phi(t), the other way is to 
use intg() in a for loop over T,
leading to something like this:

m = 2; // Weibull modulus in mechanism  #1
k = 1E-7;  // corrosion rate(s-1) in mechanism  #1
function  r = pseudoconv(t, T)
   r = 3600*m*k*((k*t)^(m-1)) * exp(-((k*t)^m)) * (1 - exp((T+t)/3E5));
endfunction
n = 500;
dT = 5;
F = zeros(1, n);
T = (0:(n-1))*dT;
for i = 1:n
   F(i) = intg(0, T(i), pseudoconv);

Sorry:

   F(i) = intg(0, T(i), list(pseudoconv, T(i)));



instead. That's the point preventing to use conv()!



end


This email and any attachments are intended solely for the use of the 
individual or entity to whom it is addressed and may be confidential and/or 
privileged.

If you are not one of the named recipients or have received this email in error,

(i) you should not read, disclose, or copy it,

(ii) please notify sender of your receipt by reply email and delete this email 
and all attachments,

(iii) Dassault Systèmes does not accept or assume any liability or 
responsibility for any use of or reliance on this email.


Please be informed that your personal data are processed according to our data 
privacy policy as described on our website. Should you have any questions 
related to personal data protection, please contact 3DS Data Protection Officer 
https://www.3ds.com/privacy-policy/contact/

___
users mailing list - users@lists.scilab.org
Click here to unsubscribe: <mailto:users-unsubscr...@lists.scilab.org>
https://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Problems with Scilab routine "conv"

2023-02-03 Thread Samuel Gougeon

Le 03/02/2023 à 20:57, Samuel Gougeon a écrit :
.../...
Here is a draft proposal:
1) build the (let's say row) vector A = (dPHI/dt) of sampled data at
sampled values t
2) build the row vector B = f(-t) of sample data at t values
3) build the matrix C of (padded) A and the matrix D of (shiffted and
padded) D = B(T-t), with T as multiples of the dt step
   Each row of C and D corresponds to a T value.
4) compute E = (C .* D)*dt  when dt is the time step.
5) Set to zero all elements on (#) and above the diagonal of E.
   That's to cancel elements with t>T, to code the upper bound T of
the integral.
5) sum E along rows  (the actual integration. You can refine with a
trapeze method).

and that's it: the resulting column vector is your F(T).


As you know the formal expressions of f() and of phi(t), the other way is to 
use intg() in a for loop over T,
leading to something like this:

m = 2; // Weibull modulus in mechanism  #1
k = 1E-7;  // corrosion rate(s-1) in mechanism  #1
function  r = pseudoconv(t, T)
   r = 3600*m*k*((k*t)^(m-1)) * exp(-((k*t)^m)) * (1 - exp((T+t)/3E5));
endfunction
n = 500;
dT = 5;
F = zeros(1, n);
T = (0:(n-1))*dT;
for i = 1:n
   F(i) = intg(0, T(i), pseudoconv);
end


Samuel





This email and any attachments are intended solely for the use of the 
individual or entity to whom it is addressed and may be confidential and/or 
privileged.

If you are not one of the named recipients or have received this email in error,

(i) you should not read, disclose, or copy it,

(ii) please notify sender of your receipt by reply email and delete this email 
and all attachments,

(iii) Dassault Systèmes does not accept or assume any liability or 
responsibility for any use of or reliance on this email.


Please be informed that your personal data are processed according to our data 
privacy policy as described on our website. Should you have any questions 
related to personal data protection, please contact 3DS Data Protection Officer 
https://www.3ds.com/privacy-policy/contact/

___
users mailing list - users@lists.scilab.org
Click here to unsubscribe: <mailto:users-unsubscr...@lists.scilab.org>
https://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Problems with Scilab routine "conv"

2023-02-03 Thread Samuel Gougeon

Le 03/02/2023 à 11:24, Heinz Nabielek a écrit :

On 03.02.2023, at 11:13, Stéphane Mottelet  wrote:

Thanks for the code.

Just a remark on the notations, you should write :

F(T)  = Int_{0}^{T}  PHI(t) . f(T-t) . dt

i.e. not F(t) since t is mute.

However, you should pay attention to the delay notion associated with 
convolution and the relationships between discrete convolution and continuous 
convolution. I am not sure that the output of conv matches with a given 
discretization of the integral above. Maybe rectangle method, but I am not sure 
at all. Anyway, you should have F(0)=0 which does not seem to be the case in 
your graph.


That's expected, since for a regular convolution as performed with
conv() or convol(), the integral bounds do not depend on the delay. They
depend only on the widths of both convoluted functions.

Neither F(t) = Int_{0}^{T} PHI(t) . f(T-t) . dt
nor F(t) = Int_{0}^{T} (d PHI(t)/dt) . f(T-t) . dt  are convolutions.
They are "elastically-limited" ones. That is to say: not convolutions at
all ;-)


F(t), of course.



no no, F(T), as Stéphane wrote it. After computing the integral over t,
t is used and over, and disappears from the result. Only the delay T
remains as parameter in the integrand, and as the variable in the result
F(T).


So now, your question might be likely: how is it possible to actually
compute
F(t) = Int_{0}^{T} (d PHI(t)/dt) . f(T-t) . dt
?

Here is a draft proposal:
1) build the (let's say row) vector A = (dPHI/dt) of sampled data at
sampled values t
2) build the row vector B = f(-t) of sample data at t values
3) build the matrix C of (padded) A and the matrix D of (shiffted and
padded) D = B(T-t), with T as multiples of the dt step
Each row of C and D corresponds to a T value.
4) compute E = (C .* D)*dt  when dt is the time step.
5) Set to zero all elements on (#) and above the diagonal of E.
That's to cancel elements with t>T, to code the upper bound T of
the integral.
5) sum E along rows  (the actual integration. You can refine with a
trapeze method).

and that's it: the resulting column vector is your F(T).

Best regards
Samuel

PS: that's an interesting problem
PS2: (#) otherwise F(0) won't be 0
___
users mailing list - users@lists.scilab.org
Click here to unsubscribe: 
https://lists.scilab.org/mailman/listinfo/users
This email and any attachments are intended solely for the use of the 
individual or entity to whom it is addressed and may be confidential and/or 
privileged.

If you are not one of the named recipients or have received this email in error,

(i) you should not read, disclose, or copy it,

(ii) please notify sender of your receipt by reply email and delete this email 
and all attachments,

(iii) Dassault Systèmes does not accept or assume any liability or 
responsibility for any use of or reliance on this email.


Please be informed that your personal data are processed according to our data 
privacy policy as described on our website. Should you have any questions 
related to personal data protection, please contact 3DS Data Protection Officer 
https://www.3ds.com/privacy-policy/contact/



Re: [Scilab-users] command longer than 4096 => get_blockcomment()

2023-02-01 Thread Samuel Gougeon

Hello Federico,

Sorry if this answer breaks the thread (despite you have forwarded your initial 
message to me with its full header):

Le 21/12/2022 à 03:15, Federico Miyara a écrit :

Dear All,

I have to create a vector from a plain text containing about 700 decimal 
numbers, each one with several digits. The total character count incuding 
spaces is about 5700, so when I run this command I get the following error:

"Command is too long (more than 4096 characters long): could not send it to 
Scilab"

Is there a simple way to do this other than splitting the text into two parts, 
each one with less than 4096 digits and then concatenating the vectors, or 
saving the data as a text file and reading the file into a string variable and 
converting to numbers?

Thanks,

Federico Miyara

Federico 
Miyara<https://www.mail-archive.com/search?l=users@lists.scilab.org=from:%22Federico+Miyara%22>
 Thu, 17 Nov 2022 13:22:08 
-0800<https://www.mail-archive.com/search?l=users@lists.scilab.org=date:20221117>

Christopher,

Yes, you understand correctly my case.



There is a reason that justifies my request: I often use my scripts as examples 
within a didactic context. They are exhaustively commented, for instance. I 
consider it preferable to have all the needed data in the same script since I 
cannot be sure that potential future users who find my script will also find 
the associated file with the data (sometimes one downloads a file for future 
use without checking whether we are downloading all the associated files).Then 
they should also change the script according to the particular directory tree 
where they choose to place the data, which is an unnecessary distraction from 
the very point of the example.I agree that it wouldn't be convenient nor 
practical to work in this way with very large data sets, but some 1000 data is 
not unusual.

Regards,

Federico Miyara


I fully understand and share your concern.

I have noticeably met a similar situation and requirement during last summer, to build 
some Scilab tests applying to some "passive extra content".
In the PHP language (that occupied me for ~9000 hours in another life), i 
remembered of some ob_start(..)  ob_end(..) instructions: In a PHP script, 
all multi-line contents lying between these two instructions are send to a 
buffer, instead of being executed.
Then for instance it is possible to get this content in a string array, with 
$myyarray = ob_get_contents().

For Scilab, a similar feature can be implemented by putting the "passive 
content" into some block-comment.
I have implemented a get_blockcomment() function to read some block-comment in 
the Scilab script being currently executed.
The supported syntaxes are:
r = get_blockcomment() : reads and returns the next block-comment following 
this call.
r = get_blockcomment(n) : reads and returns the nth block-comment of the 
current file.
with r: column of text
Option doEval (boolean): evaluates the read content and returns the results e 
instead of it:
e = get_blockcomment( , %t)
e = get_blockcomment(n, %t)

If no block-comment can be read, [] is returned.
The unitary tests file of this function is attached.

This function was first implemented as an internal one.
But afterwards, like you, i've thought that it is a general usage function, and 
indeed i use it as well in other contexts.

I think it would be useful in Scilab.  Would this be right?
Maybe its name could be improved.

Best regards
Samuel


This email and any attachments are intended solely for the use of the 
individual or entity to whom it is addressed and may be confidential and/or 
privileged.

If you are not one of the named recipients or have received this email in error,

(i) you should not read, disclose, or copy it,

(ii) please notify sender of your receipt by reply email and delete this email 
and all attachments,

(iii) Dassault Systèmes does not accept or assume any liability or 
responsibility for any use of or reliance on this email.


Please be informed that your personal data are processed according to our data 
privacy policy as described on our website. Should you have any questions 
related to personal data protection, please contact 3DS Data Protection Officer 
https://www.3ds.com/privacy-policy/contact/

// =
// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
// Copyright (C) 2023 - Le Mans Université - Samuel GOUGEON
//
//  This file is distributed under the same license as the Scilab package.
// =
// <-- CLI SHELL MODE -->
// <-- NO CHECK REF -->
// <-- ENGLISH IMPOSED -->

// Unitary tests of get_blockcomments()
// 
/* First block comment:
 -4 -5 -6  1  9  9  6  2
  6 -1  7  1  2  7 -6 -2
*/
// Read the next block-comment following this call:
r = get_

Re: [Scilab-users] command longer than 4096

2023-02-01 Thread Samuel Gougeon

Hello Federico,

Sorry if this answer breaks the thread (despite you have forwarded your initial 
message to me with its full header. Thanks):

Le 21/12/2022 à 03:15, Federico Miyara a écrit :

Dear All,

I have to create a vector from a plain text containing about 700 decimal 
numbers, each one with several digits. The total character count incuding 
spaces is about 5700, so when I run this command I get the following error:

"Command is too long (more than 4096 characters long): could not send it to 
Scilab"

Is there a simple way to do this other than splitting the text into two parts, 
each one with less than 4096 digits and then concatenating the vectors, or 
saving the data as a text file and reading the file into a string variable and 
converting to numbers?

Thanks,

Federico Miyara

Federico 
Miyara<https://www.mail-archive.com/search?l=users@lists.scilab.org=from:%22Federico+Miyara%22>
 Thu, 17 Nov 2022 13:22:08 
-0800<https://www.mail-archive.com/search?l=users@lists.scilab.org=date:20221117>

Christopher,

Yes, you understand correctly my case.



There is a reason that justifies my request: I often use my scripts as examples 
within a didactic context. They are exhaustively commented, for instance. I 
consider it preferable to have all the needed data in the same script since I 
cannot be sure that potential future users who find my script will also find 
the associated file with the data (sometimes one downloads a file for future 
use without checking whether we are downloading all the associated files).Then 
they should also change the script according to the particular directory tree 
where they choose to place the data, which is an unnecessary distraction from 
the very point of the example.I agree that it wouldn't be convenient nor 
practical to work in this way with very large data sets, but some 1000 data is 
not unusual.

Regards,

Federico Miyara


I fully understand and share your concern.

I noticeably encountered a similar situation and requirement during last summer, to build 
some Scilab tests applied to some "passive extra content".
In the PHP language (that kept me busy for ~9000 hours in another life), i 
remembered some ob_start(..)  ob_end(..) instructions: In a PHP script, all 
multi-line contents lying between these two statements are send to a buffer, 
instead of being executed.
Then for instance it is possible to get this content in a string array, with 
$myarray = ob_get_contents().

For Scilab, a similar feature can be implemented by putting the "passive 
content" in a /* multiline block of comments */.
Thus, i have implemented a get_blockcomment() function to read some 
block-comment in the Scilab script being currently executed.

The supported syntaxes are:
r = get_blockcomment() : reads and returns the next block-comment following 
this call.
r = get_blockcomment(n) : reads and returns the nth block-comment of the 
current file.
with r: column of text
Option doEval (boolean): evaluates the content and returns the results e 
instead of it:
e = get_blockcomment( , %t)
e = get_blockcomment(n, %t)

If no block-comment can be read, [] is returned.
The unitary tests file of this function is attached.

This function was first implemented as an internal one.
But afterwards, like you, i've thought that it is a general usage function, and 
indeed i use it as well in other contexts.

I think it would be useful in Scilab.  Would this be right?
Maybe its name could be improved.

Best regards
Samuel


This email and any attachments are intended solely for the use of the 
individual or entity to whom it is addressed and may be confidential and/or 
privileged.

If you are not one of the named recipients or have received this email in error,

(i) you should not read, disclose, or copy it,

(ii) please notify sender of your receipt by reply email and delete this email 
and all attachments,

(iii) Dassault Systèmes does not accept or assume any liability or 
responsibility for any use of or reliance on this email.


Please be informed that your personal data are processed according to our data 
privacy policy as described on our website. Should you have any questions 
related to personal data protection, please contact 3DS Data Protection Officer 
https://www.3ds.com/privacy-policy/contact/

// =
// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
// Copyright (C) 2023 - Le Mans Université - Samuel GOUGEON
//
//  This file is distributed under the same license as the Scilab package.
// =
// <-- CLI SHELL MODE -->
// <-- NO CHECK REF -->
// <-- ENGLISH IMPOSED -->

// Unitary tests of get_blockcomments()
// 
/* First block comment:
 -4 -5 -6  1  9  9  6  2
  6 -1  7  1  2  7 -6 -2
*/
// Read the next bl

Re: [Scilab-users] Basic query - mprintf

2023-01-14 Thread Samuel Gougeon
[Let's try to answer without technical reply. Hope to not break or shift 
the thread]



On 2023-01-11 22:33:10, Stefan Du Rietz wrote:

Too print all elements, the argument must be a column vector: fac'
And to avoid repeating the first wording, you can print it separately:

--> mprintf("Factors of 1729 are: "), mprintf("%d  ", fac')
Factors of 1729 are: 7  13  19

Stefan

Yes, i have well read your previous answer. I was just providing an 
alternative.


That was not the initial querry, but write() allows to iterate on rows 
AND columns in the same way, adapting to free numbers of rows AND 
columns with the same unique simple syntax:


--> fac = grand(3,4,"uin",0,9)
 fac  =
   2.   5.   9.   3.
   2.   4.   5.   5.
   4.   1.   8.   5.

--> write(%io(2), fac, "(''The row is:'', 10(i2,2x))")
The row is: 2   5   9   3
The row is: 2   4   5   5
The row is: 4   1   8   5

One could dream of extending the C syntax with this Fortran feature...
The first days of January are a good for wishes :-)

Samuel___
users mailing list - users@lists.scilab.org
Click here to unsubscribe: 
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Basic query - mprintf

2023-01-10 Thread Samuel Gougeon

Le 07/04/2022 à 09:50, Lester Anderson a écrit :

Hello all,

Very basic query but how do you print all the values from a result via 
mprintf?


e.g.

fac = factor(1729)
7 13 19

mprintf('Factors of 1729 are: %d\n', fac)
just prints 'Factors of 1729 are: 7

You may also use a Fortran syntax -- that supports automatic inline 
iterations, unlike C syntaxes -- instead of a  C one:


--> fac = factor(1729);
--> write(%io(2), fac, "(''Factors of 1729 are:'', 10(i2,2x))")

Factors of 1729 are: 7  13  19

Samuel

PS : i no longer receive messages from users@ since 2022-10-05 (last 
received).
So for the time being, i answer to old threads, to not break recent ones 
to which i can't reply, just read archives.


___
users mailing list - users@lists.scilab.org
Click here to unsubscribe: 
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Messagebox - button pre-selection

2023-01-07 Thread Samuel Gougeon

Le 22/10/2021 à 12:56, P M a écrit :

Dear,

in a messagebox:

Is it possible to have a button other than the first one pre-selected?

e.g.: I'd like to have "No" pre-selected in the example below?

In my application the buttons must stay in their order as they 
are...so simply changing the order (button label) is no option.


Thank you,
Philipp

grafik.png




Is it possible to have a button other than the first one pre-selected?


Almost :-/  So, AFAIK, unfortunately no.
There is a CallScilabBridge.setMessageBoxDefaultSelectedButtons(id, k) 
java method (*)

that should set it, where k is the index of the preselected button.
But in the code it is apparently implemented only for x_choices()

As well,

messagebox("Have you seen this beautiful message", "info", ["Yes" "No"]);
jimport org.scilab.modules.gui.utils.UIElementMapper ;
m = UIElementMapper.getCorrespondingUIElement(1);
m.setDefaultSelectedButtons(1); // First is #0

does nothing

Samuel

(*)
jimport org.scilab.modules.gui.bridge.CallScilabBridge
jgetmethods(CallScilabBridge)
___
users mailing list - users@lists.scilab.org
Click here to unsubscribe: 
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Uniform distribution of non equidistant integers

2022-08-29 Thread Samuel Gougeon

Le 29/08/2022 à 20:46, Jens Simon Strom a écrit :

Hallo,
to get a random number from an uniform distribution of e.g. 1, 5 and 9 
I can use


x=grand(1,1, "uin", 1, 3); if x==2; x=5; elseif x==3 x=9; end xI there 
a more straightforward way?


or, faster,

[1 5 9](grand(1,1,"uin",1,3))
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Uniform distribution of non equidistant integers

2022-08-29 Thread Samuel Gougeon

Le 29/08/2022 à 20:46, Jens Simon Strom a écrit :

Hallo,
to get a random number from an uniform distribution of e.g. 1, 5 and 9 
I can use


x=grand(1,1, "uin", 1, 3); if x==2; x=5; elseif x==3 x=9; end xI there 
a more straightforward way?



sample(1, [1 5 9])

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


Re: [Scilab-users] Unexpected result using horner

2022-07-25 Thread Samuel Gougeon

Le 25/07/2022 à 02:44, Federico Miyara a écrit :


Samuel,


Sorry, but nothing is clear to me about your statements:

1) what shows you that iir() is correct while the analpf + horner way 
is not?


There are several reasons:

a) The result of using iir() is consistent with the expected frequency 
response, since it is equal to the analog filter response except at 
high frequency, an expected artifact for IIR filters. The other 
solution is completely different.


b) The degree of the denominator should be 6 but when using horner it 
reduces to 3.


My own informal and not very deep analysis suggests that as all the 
poles are very close to unity, may be horner() performs some 
simplification and simplifies things incorrectly, which might 
dramatically change the frequency response.


2) With the analpf + horner method, assuming that it is not correct, 
what shows you that horner is not correct, while analpf is correct, 
instead of the opposite or both incorrect?


analpf() is a very simple algorithm, at least for Butterworth, since 
explicit formulas for the poles exist and in all the cases I have 
tested the result is the expected one, particularly in this case.



3) do you have a reference about the equivalence?


The substitution of the bilinear transformation is the usual method to 
get an IIR digital filter from an analog prototype. They aren't 
completely equivalent, but very similar up to about half Nyquist 
frequency. Any book on digital signal processing includes that 
transformation. Also https://en.wikipedia.org/wiki/Bilinear_transform



4) have you tried after simp_mode(%f)?


No, but this might be the answer considering my reply to 2). I'll try 
it later.



To get equivalent transfer functions, you need
a) indeed to turn simp_mode(%f),
b) to run
hBPz1= iir(3, "bp", "butt", fo/Fs*[2^(-1/6), 2^(1/6)], [0 0])
instead of
hBPz1= iir(3, "bp", "butt", fo/Fs*[2^(1/6),2^(-1/6)], [0 0])

Then the curves of both transfer functions are superimposed.

clf,  plot(linspace(0.5,1.5,100),  [hBPsz,  hBPz1]) When working with polynomials or rationals, one must keep in 
mind that every time that their roots or/and poles have close values, 
then results become very sensitive to numerical round-off errors or 
uncertainties. The roots of a polynomial of degree N can't be computed 
from its coefficients with a numerical relative accuracy better than 
%eps^(1/N). If this uncertainty becomes bigger than the distance between 
roots values, then things become really bad.

Samuel

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


Re: [Scilab-users] Unexpected result using horner

2022-07-24 Thread Samuel Gougeon

Le 24/07/2022 à 13:34, Samuel Gougeon a écrit :


Sorry, but nothing is clear to me about your statements:

1) what shows you that iir() is correct while the analpf + horner way 
is not?


2) With the analpf + horner method, assuming that it is not correct, 
what shows you that horner is not correct, while analpf is correct, 
instead of the opposite or both incorrect?


3) do you have a reference about the equivalence?

4) have you tried after simp_mode(%f)?



By the way, you may edit iir(). You will see that it uses analpf() as 
well, plus bilt() and trans() instead of (directly) horner.

Then editing bilt and trans show a lot of code...



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


Re: [Scilab-users] Unexpected result using horner

2022-07-24 Thread Samuel Gougeon

Hello Federico,
Le 20/07/2022 à 22:47, Federico Miyara a écrit :


Dear All,

I have problems with this script:
Fs  =  44100;
fo  =  500;
B  =  2^(1/6)-2^(-1/6);
// Low-pass Butterworth
hLPs  =  analpf(3,"butt",[],1);
// Band-pass Butterworth centered at fo
hBPs  =  horner(hLPs,  (2*%pi*fo/%s  +  %s/(2*%pi*fo))/B)

// Apply bilinear transform
hBPz  =  horner(hBPs,  2*Fs*(%z  -  1)/(%z  +  1))
// Attempt to get the same using iir
hBPz1  =  iir(3,  "bp",  "butt",  fo/Fs*[2^(1/6),2^(-1/6)],  [0  0])
I attempt to design a discrete Butterworth band-pass filter using two 
equivalent methods:


1) Manually applying a bilinear transform to the analog filter 
designed with analpf()

2) Applying the function iir()

For some resaon I couldn't figure out, the first method yields an 
unexpected result:


--> hBPz
 hBPz  =
   0.005 +0.016z +0.016z² +0.005z³
   ---
   -0.9671578 +2.9195957z -2.9518237z² +z³

--> hBPz1
 hBPz1  =
 0.006 -0.017z² +0.017z⁴ -0.006z⁶
- 

   1.0335428 -6.1515162z +15.271063z² -20.239437z³ +15.104038z⁴ 
-6.0176897z⁵ +z⁶


The official function iir() is correct. The manual procedure 
unexpectedly reduces the order of the denominator.


Maybe someone can find out what's going on...



Sorry, but nothing is clear to me about your statements:

1) what shows you that iir() is correct while the analpf + horner way is 
not?


2) With the analpf + horner method, assuming that it is not correct, 
what shows you that horner is not correct, while analpf is correct, 
instead of the opposite or both incorrect?


3) do you have a reference about the equivalence?

4) have you tried after simp_mode(%f)?

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


Re: [Scilab-users] output buffer

2022-06-20 Thread Samuel Gougeon

Le 20/06/2022 à 12:04, Jean-Yves Baudais a écrit :

Hello,


Le 17/06/2022 à 23:45, Stephane Mottelet a écrit :
The buffer size is not set by Scilab and hence is always the default 
for a given platform (it can be different for macOS, Linux, Windows). 
I suppose you need to increase or decrease it for a given application?



It is just for convenience. Here a better explanation. During 
simulation, I write some variables on file (used latter for 
statistical analysis) and I use to prepare and test the 
post-processing using the partial output data. Scilab does not write 
the data one by one, but by block of size 4096. The following code 
shows this behaviour.



--> function stupidWrite(fd,n,a)
--> for i=1:n mfprintf(fd,"%d",a); end
--> endfunction
--> fd=mopen("test.am","a");
--> stupidWrite(fd,4096,1);
--> unix_g("cat test.am | wc ");
 ans  =
  "  0   0   0"
--> stupidWrite(fd,1,2);
--> unix_g("cat test.am | wc ");
 ans  =
  "  0   1    4096"
--> mclose(fd)
--> unix_g("cat test.am |wc ")
 ans  =
  "  0   1    4097"


With the C language, the size of the output buffer is managed using 
setvbuf. It seems that there is no interface for C-coded version of 
setvbuf (contrary to many input/output C function).


So my question is: "is it possible to manage the size of the output 
buffer in Scilab?"


The solution I found is to mopen and mclose the file each time I want 
to write something. Is there another solution?



To me, here the issue looks not so much about the size of the internal 
buffer, but about the inability to flush buffered data on request, 
whatever is the buffer size.
For instance, we could simply hope that, for a text file, sending an 
ascii(12) form feed alone (*) would trigger flushing the buffer, in a 
trivial, documented, and straightforward way.


By the way, the current default buffering and buffer size of mfprintf() 
would deserve being documented.


My two cents

Samuel

(*) easy to detect by the receiver: 1 byte, equal to ascii(12) => flush 
instead of writing.


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


Re: [Scilab-users] Undefined variable: vers?

2022-06-17 Thread Samuel Gougeon

Hello Heinz,

The call stack shows that the error occurs when calling haveacompiler() 
to see if a compiler is installed,

and then run the actual demo or skip it.
If there is no compiler, haveacompiler() should return %F without 
yielding any error.
So it's a bug. It is not yet reported on scilab's bugzilla. You may do 
it, and then provide the more information you can about the actual 
status of your computer in term of actually installed compiler(s).


Samuel

Le 16/06/2022 à 20:47, Heinz Nabielek a écrit :

Win10 Scilab does not run some Demonstrations.
What happened?
Heinz



Startup execution:
   loading initial environment

--> ver
  ans  =

  column 1

   "Scilab Version: "
   "Operating System: "
   "Java version: "
   "Java runtime information: "
   "Java Virtual Machine information: "
   "Vendor specification: "

  column 2

   "6.1.1.1626343451"
   "Windows 10 10.0"
   "1.8.0_292"
   "OpenJDK Runtime Environment (build 1.8.0_292-b10)"
   "OpenJDK 64-Bit Server VM (build 25.292-b10, mixed mode)"
   "Oracle Corporation"
at line38 of function getVsWhereInformation ( C:\Program 
Files\scilab-6.1.1\modules\dynamic_link\macros\windows\getVsWhereInformation.sci
 line 38 )
at line 3 of function dlwIsVc141Express ( C:\Program 
Files\scilab-6.1.1\modules\dynamic_link\macros\windows\dlwIsVc141Express.sci 
line 16 )
at line31 of function dlwFindMsVcCompiler   ( C:\Program 
Files\scilab-6.1.1\modules\dynamic_link\macros\windows\dlwFindMsVcCompiler.sci 
line 45 )
at line12 of function findmsvccompiler  ( C:\Program 
Files\scilab-6.1.1\modules\dynamic_link\macros\findmsvccompiler.sci line 26 )
at line 2 of function dlwHaveCompiler   ( C:\Program 
Files\scilab-6.1.1\modules\dynamic_link\macros\windows\dlwHaveCompiler.sci line 
15 )
at line 7 of function haveacompiler ( C:\Program 
Files\scilab-6.1.1\modules\dynamic_link\macros\haveacompiler.sci line 20 )
at line   109 of function demo_pendulum ( C:\Program 
Files\scilab-6.1.1\modules\differential_equations\demos\n_pendulum\n_pendulum.sci
 line 117 )
at line11 of executed file C:\Program 
Files\scilab-6.1.1\modules\differential_equations\demos\n_pendulum\n_pendulum.dem.sce

Undefined variable: vers
at line38 of function getVsWhereInformation ( C:\Program 
Files\scilab-6.1.1\modules\dynamic_link\macros\windows\getVsWhereInformation.sci
 line 38 )
at line 3 of function dlwIsVc141Express ( C:\Program 
Files\scilab-6.1.1\modules\dynamic_link\macros\windows\dlwIsVc141Express.sci 
line 16 )
at line31 of function dlwFindMsVcCompiler   ( C:\Program 
Files\scilab-6.1.1\modules\dynamic_link\macros\windows\dlwFindMsVcCompiler.sci 
line 45 )
at line12 of function findmsvccompiler  ( C:\Program 
Files\scilab-6.1.1\modules\dynamic_link\macros\findmsvccompiler.sci line 26 )
at line 2 of function dlwHaveCompiler   ( C:\Program 
Files\scilab-6.1.1\modules\dynamic_link\macros\windows\dlwHaveCompiler.sci line 
15 )
at line 7 of function haveacompiler ( C:\Program 
Files\scilab-6.1.1\modules\dynamic_link\macros\haveacompiler.sci line 20 )
at line10 of function demo_wheel2   ( C:\Program 
Files\scilab-6.1.1\modules\differential_equations\demos\wheel\wheel2.dem.sce 
line 18 )
at line73 of executed file C:\Program 
Files\scilab-6.1.1\modules\differential_equations\demos\wheel\wheel2.dem.sce

Undefined variable: vers
___
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] Graphics: Current figure and current entity

2022-06-07 Thread Samuel Gougeon

Le 07/06/2022 à 11:39, CRETE Denis a écrit :


Hello,

I have several graphic windows and in some of them, there are several 
“Axes” (and several curves for each “Axes”).


I can’t find in “Scilab Help” if the “current axes” is always in the 
hierarchy of the “current entity”, and similarly if the “current 
figure” is always in the hierarchy of the “current axes”.



Good question. Let's test it :

1. sca(ax) sets the current figure to the one homing the ax axes:
   --> scf(0); plot(1:10); e0 = gce(); ax0 = gca();
   --> scf(1); plot(1:10); e1 = gce(); ax1 = gca();
   --> sca(ax0);
   --> gcf().figure_id
 ans  =
   0.
   --> sca(ax1);
   --> gcf().figure_id
 ans  =
   1.

2. set("current_entity", h) does NOT set the current figure to the one
   homing the targeted entity:
   --> scf(0); plot(1:10); e0 = gce(); ax0 = gca();
   --> scf(1); plot(1:10); e1 = gce(); ax1 = gca();
   --> set("current_entity", e0);
   --> gcf().figure_id
 ans  =
   1.
   --> gca().parent.figure_id
 ans  =
   1.

So now we can answer to your questions:

I can’t find in “Scilab Help” if the “current axes” is always in the 
hierarchy of the “current entity”,

Almost never.

and similarly if the “current figure” is always in the hierarchy of 
the “current axes”. 

Yes it is.


If this was true, I suggest to mention it in the “Graphics Entities” 
section.



Right, the sca() and set() pages could be clarified about this.

If not, is there a simple way to obtain the handle of the figure where 
the “current entity” is ?

I tried the following, which seems to work :

G_f = gce().parent;

while get(G_f,”type”)~=”Figure”,

  G_f =  G_f.parent;

end;


Yes, in short:

G_f = gce();

while G_f.type ~= ”Figure”,   G_f =  G_f.parent; end


that will work even when the initial G_f is already a figure.

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


Re: [Scilab-users] unloader.sci & module.quit

2022-02-15 Thread Samuel Gougeon

Le 15/02/2022 à 20:24, Samuel Gougeon a écrit :

.../...

  * If the module to unload is an autoloaded ATOMS module, its library
is protected. Then trying to clear it yields an expected error.
The default unloader.sce does not take this into account. Yet, it
should avoid or handle the error without stopping.

Actually, the error is caught, but prevents unloading the documentation 
and preferences.
Maybe it's better in this way (unload all parts of the module, or none 
of them).


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


Re: [Scilab-users] unloader.sci & module.quit

2022-02-15 Thread Samuel Gougeon

Le 15/02/2022 à 19:03, Jean-Yves Baudais a écrit :

--> clear(string(mylib)(2:$))

Thanks! It does what I expected.


Should we actually clear also macros belonging to the library, in the default
unloaded.sce script?
There is currently an explicit warning in comment: " This does not unregister
its macros"
I think it would be cleaner. But there may be some reasons to not having done
it...

For my Scilab understanding, what are the reasons?


I don't know. May be none.

To me, there is a bunch of questions / issues about this unloader.sce 
and the ~/etc/module.quit scripts.


The default unloader.sce is generated for instance by tbx_make(..)

 * If the module to unload is an autoloaded ATOMS module, its library
   is protected. Then trying to clear it yields an expected error.
   The default unloader.sce does not take this into account. Yet, it
   should avoid or handle the error without stopping.

 * unloader.sce should clear loaded functions of the library, as you
   suggest.
   Indeed, if it's not wished, it is simple to comment the line in the
   final version.
   Otherwise, if you have asked how to do, it's that the syntax is not
   trivial to find.

 * atomsQuit() : the documentation (and code) of this function are
   prone to discussion:
1. its page says that it executes .quit files of all loaded ATOMS
   modules, while it calls their unloader.sce script
2. its page says "/This function is called by
   SCI/etc/scilab.quit/". If it is its only usage, then it's an
   internal, and it should not be documented.
3. According to its code: if the autoloading mode of the ATOMS
   system is OFF, then atomsQuit() does nothing! That's strange.
   This could mean that it is definitely not aimed to be used out
   of the automatic Scilab startup.
4. It can't be used to quit some given modules. Only to quit all
   loaded modules. So..
5. Proposals:
 + Either we keep atomsQuit() as is, and undocument it to make
   it as an internal function
 + Or we remove the condition (3), and we add an input argument
   = vector of modules name to quit.

Any comments?

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


Re: [Scilab-users] clearing macros of a library

2022-02-15 Thread Samuel Gougeon

Hello Jean-Yves,

Le 15/02/2022 à 17:27, Jean-Yves Baudais a écrit :

Bonjour,

Is there a simple way to clear all the used functions of a given library, because 
unloader.sce only remove the library from the "who" list, but not the functions 
that have already been used and that stay in memory, unfortunatly!

Yes, this way:

--> clear(string(mylib)(2:$))

Should we actually clear also macros belonging to the library, in the 
default unloaded.sce script?
There is currently an explicit warning in comment: "This does not 
unregister its macros"
I think it would be cleaner. But there may be some reasons to not having 
done it...


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


Re: [Scilab-users] [question] xcos yielding different result than SIMULINK

2022-02-10 Thread Samuel Gougeon

Le 10/02/2022 à 11:06, Samuel Gougeon a écrit :

Hello,

Le 10/02/2022 à 10:35, Foad Sojoodi Farimani a écrit :
I had initially asked the question here 
<https://discordapp.com/channels/384316553497280512/384325768685027328/941093238436134912> 
on xcos Discord channel <https://discord.gg/KeG3rdQ>.
Basically, I want to replicate this SIMULINK tutorial 
<https://youtu.be/PRFCBVTFy90> in xcos, and so far you may see the 
.zcox file in the attachment. However, my plots in xcos are quite 
different from the ones in the above YouTube video.



Setting the scope with ymin=0, ymax=1.5 and refresh period = 5 (or 10 or 
20) already helps showing and comparing.


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


Re: [Scilab-users] [question] xcos yielding different result than SIMULINK

2022-02-10 Thread Samuel Gougeon

Le 10/02/2022 à 11:06, Samuel Gougeon a écrit :

Hello,

Le 10/02/2022 à 10:35, Foad Sojoodi Farimani a écrit :
I had initially asked the question here 
<https://discordapp.com/channels/384316553497280512/384325768685027328/941093238436134912> 
on xcos Discord channel <https://discord.gg/KeG3rdQ>.
Basically, I want to replicate this SIMULINK tutorial 
<https://youtu.be/PRFCBVTFy90> in xcos, and so far you may see the 
.zcox file in the attachment. However, my plots in xcos are quite 
different from the ones in the above YouTube video.



The video is 26mn long, with several versions of the diagram. Which 
version are you addressing?
Wrt to the version at 19:00, why do you skip the 1/s block and adds an 
INTEGRAL_m block in your sent version ?




OK, you have switched the positions of your integral and proportional 
branches.
Are INTEGRAL_m and INTEGRAL_f blocks equivalent? INTEGRAL_f has less 
parameters.


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


Re: [Scilab-users] [question] xcos yielding different result than SIMULINK

2022-02-10 Thread Samuel Gougeon

Hello,

Le 10/02/2022 à 10:35, Foad Sojoodi Farimani a écrit :
I had initially asked the question here 
 
on xcos Discord channel .
Basically, I want to replicate this SIMULINK tutorial 
 in xcos, and so far you may see the 
.zcox file in the attachment. However, my plots in xcos are quite 
different from the ones in the above YouTube video.



The video is 26mn long, with several versions of the diagram. Which 
version are you addressing?
Wrt to the version at 19:00, why do you skip the 1/s block and adds an 
INTEGRAL_m block in your sent version ?


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


Re: [Scilab-users] please help, I have just a mental blockade

2022-02-07 Thread Samuel Gougeon

Le 07/02/2022 à 20:28, Claus Futtrup a écrit :

Hi Samuel, and all Scilabers

Entertaining response from Samuel!

It's about knowing that the cumsum function exist. :-)

I googled Scilab cumsum and found old docs that it was part of 
elementary matrix operations 
(https://help.scilab.org/doc/6.0.0/en_US/cumsum.html), but in Scilab 
6.1.1 this is part of a XCOS matrix palette.


Hmm.

The documentation for cumsum is now found under XCOS. What is the 
motivation behind this choice?



It's an error in the 6.1.1 online doc (likely occuring during its recent 
regeneration (mid december) after its truncation 
, 
while CUMSUM and cumsum are homonymous).

https://help.scilab.org/docs/6.1.0/en_US/cumsum.html  is OK
--> help cumsum // as well

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


Re: [Scilab-users] please help, I have just a mental blockade

2022-02-07 Thread Samuel Gougeon

Hello Heinz,

Le 07/02/2022 à 18:35, Heinz Nabielek a écrit :

Sorry, colleagues  -   please help, I have just a mental blockade.

Given vector EE= [3 5 8]

I want to create a stepwise increasing vector E= [0 0 1 1 2 2 2 3 3 3 3]

And would need a system that works for much larger numbers

Probably dead easy?



--> v = zeros(1,15);
--> v([3 5 8]) = 1;
--> cumsum(v)
 ans  =
   0.   0.   1.   1.   2.   2.   2.   3.   3.   3.   3.   3. 3.   3.   3.


HTH
Samuel

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


Re: [Scilab-users] xdel replaced by close()

2022-01-21 Thread Samuel Gougeon

Hello Claus,

Le 21/01/2022 à 20:58, Claus Futtrup a écrit :

Hi Scilabers

Today I tried to replace xdel(winsid()) in one of my scripts with 
close(winsid()) because Scilab shows a warning in the console:


Warning: Feature xdel(...) is obsolete and will be permanently removed 
in Scilab 6.2


Warning: Please use close(...) instead.

I am negatively surprised that the close() command takes a long time 
to execute with 5-10 windows open (a few seconds per window). The 
xdel() command can do it in a split second.




The issue comes not from close() but from the change offindobj() that it 
calls , noticeably 
to perform findobj("figure_id",id) in 6.1.1.
It does not impact only  close() for 
this case, that was processed as a special accelerated case 
 
in the former findobj().


This downgradingwas reported 
 7 months before 
releasing 6.1.1, and knowingly ignored, while it is perfectly fixable by 
restoring the fast special case.





What is the motivation for replacing xdel with close?


Both do the same thing. Scilab does not need duplicates.

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


[Scilab-users] Direct file access with write(fid,a,k,fm) ?

2022-01-15 Thread Samuel Gougeon

Dear co-Scilabers,

In the help page of the write() function @ 
https://help.scilab.org/docs/6.1.1/en_US/write.html,

an enigmatic sentence somewhat describes a interesting writing mode:
"
/Direct access files : x = write(file_desc, a, k, format). Here k is the 
vector of records (one record//

// by row, i.e. m = prod(size(k))//
/
"/Direct access/ can be very useful, in order to write only targeted 
records, instead of the whole file.
But here this description looks completely obscure to me, and there is 
no related example.


I have tried many things using such a syntax with a text file, for 
instance with the following example, and all of them fail:


a  =  rand(5,3)*100;
File  =  "write_test.txt";
mdelete(File);
fm  =  "(3(2x,f4.0))";  // 3*(2+4) = 18 bytes / row
write(File,  a,  fm);

fid  =  file("open",File,"unknown","direct",18);
k  =  [3  4];
b  =  -a(k,:);
write(fid,  b,  k,  fm);
file('close',fid)

This yields an error:

--> write(fid, b, k, fm)
Incorrect file or format.

Would anyone have any hints about this syntax, noticeably about the /k/ 
and /m/ meanings?


Regards
Samuel

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


Re: [Scilab-users] question to surf()

2022-01-04 Thread Samuel Gougeon

Le 04/01/2022 à 14:29, P M a écrit :

...indeed..no problems with Scilab 6.1.1



Likely because this example needs a bigger Java heap used for graphics.
The default Java heap size has been increased from 256 to 512 MB in 
6.1.1, for this kind of example.
If you still work with Scilab < 6.1.1, you can increase the heap in your 
preferences => General


Regards
Samuel

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


Re: [Scilab-users] Bernoulli numbers calculation

2021-12-30 Thread Samuel Gougeon

Hello Lester,

Le 30/12/2021 à 08:59, Lester Anderson a écrit :

Hello Samuel,

Thanks for the solution. As pointed out it is best to show the 
equation being assessed (from www.bernoulli.org 
). The one I looked at was the following:


Explicit_formula.PNG

Using nchoosek in the original code gives the same issue.



The inner sum over v is very prone to cumulative rounding errors:
The term v^n gets huge rapidly -- so is numerically truncated --,
while the (-1)^v term makes the sum alternate, which enhances residues...
that then mainly come from numerical truncations.
With n_max = 20, the maximum value of nchoosek(20,10)=184756
and is definitely not an issue. While even only 13^13
--> 13^13
 ans  =
   3.029D+14
is already not far from 1/%eps.
The recurrent implementation proposed earlier and based on
Bₘ =  -∑_k=0_→ m-1 (C_^k _m+1 ).B_k /(m+1)

\frac{-1}{m+1}{\sum _{{k=0}}^{{m-1}}{m+1 \choose k}B_k

has neither alternate terms nor huge power values that make a
direct computation numerically catastrophic.

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


Re: [Scilab-users] Bernoulli numbers calculation

2021-12-29 Thread Samuel Gougeon

Hello Lester,


Le 29/12/2021 à 09:00, Lester Anderson a écrit :

Hello,

A quick query. Have adapted existing Matlab code for Scilan to 
calculate Bernoulli numbers using an explicit formula 
(www.bernoulli.org ).


Not so explicit. Could you please provide the formula, before 
implementing it in Scilab language?
The following is a "vectorized" version of your code, likely with the 
same mistake:


B=[];
for  m  =  0:20
Sum  =  0;
for  k=0:m
v  =  0:k;
Sum  =  Sum  +  sum(((-1).^v).*nchoosek(k,v).*(v.^m)/(k+1));
end
B(m+1)  =  Sum;
end

A working implementation based on the recurrent formula 
Bm=−1m+1∑k=0m−1(m+1k)Bk


could be:

mMax  =  20;
B  =  zeros(1,mMax);
B(1:2)  =  [1  -1/2];
for  m  =  2:2:mMax
B(1,m+1)  =  -sum(nchoosek(m+1,0:m-1).*B(1,1:m))/(m+1);
end--> B ans  = column 1 to 13   1.  -0.5   0.167   0.  
-0.033   0.   0.0238095   0.  -0.033   0.   0.0757576   0.  
-0.2531136



 column 14 to 21
   0.   1.167   0.  -7.0921569   0.   54.971178   0. -529.12424

To fasten the loop, the call to nchoosek() could be replaced with the 3 
last rows of Pascal's triangle.


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


Re: [Scilab-users] partial fractions

2021-12-29 Thread Samuel Gougeon

Hello Federico,

Le 16/07/2021 à 21:11, Federico Miyara a écrit :


Dear All,

I'm wonderig whether there is a standard method to obtain the partial 
fraction expansion of a rational function.


Searching, I've found the function pfss(), which purportedly is meant 
for that, but I find it doesn't give a complete solution. For instance:


// Poles and zeros
p = [-8:-1];
z = [0 0 0 0];

// Numerator and denominator
N = prod(%s - z)
D = prod(%s - p)

// Rational function
H = N/D

// Partial fractions
HH = pfss(H)

The result is

HH  =
   HH(1)

   -8 -5.7428571s -3.9515873s² +0.2960317s³ -0.0946429s⁴ -0.006746s⁵ 
-0.0001984s⁶
-- 


  40320 +69264s +48860s² +18424s³ +4025s⁴ +511s⁵ +35s⁶ +s⁷

   HH(2)

   0.0001984
   -
 1 +s

The second component in the list is indeed one of the partial 
fractions, but the first one is not an irreductible version. 



The pfss() rmax option must be used, and set to a big value, for 
instance 1/%eps.

https://help.scilab.org/docs/6.1.0/en_US/pfss.html
Then:

--> D = list2vec(pfss(H,1/%eps))'
 D  =

   -0.8126984  3.3347222  -5.4  4.3402778  -1.778  0.3375 
-0.022  0.0001984
   --  -    -  --  -- 
--  -
  8 +s   7 +s 6 +s    5 +s    4 +s  3 +s  2 
+s   1 +s


--> clean(sum(D)-H)
 ans  =

   0
   -
   1


Computing HH(1) + HH(2) yields H with good approximation.

I guess I could proceed iteratively with HH(1), but it would be nice 
to have a function performing this automatically. I couldn't find such 
a function



In addition, partfrac() is available on FileExchange since 2015 @ 
https://fileexchange.scilab.org/toolboxes/451000
It manages poles multiplicity. With it, your example (with only simple 
poles) gives the following:


--> H = N/D
 H  =
s⁴
---
   40320 +109584s +118124s² +67284s³ +22449s⁴ +4536s⁵ +546s⁶ +36s⁷ +s⁸

--> [I, R, F, T] = partfrac(H);

--> I  // integer part of the fraction
 I  =
   0.

--> R   // Undecomposed remainder of the fraction
 R  =
s⁴
---
   40320 +109584s +118124s² +67284s³ +22449s⁴ +4536s⁵ +546s⁶ +36s⁷ +s⁸

--> F   // Decomposition: row #1 = numerators ; row #2 = poles value ; 
row #3 = poles multiplicity

 F  =

  -0.8126984   3.3347222  -5.4   4.3402778  -1.778   0.3375 
-0.022   0.0001984
  -8. -7. -6.   -5. -4. -3. -2. 
-1.

   1.  1.  1.    1.  1. 1.   1.  1.

--> T  // Decomposition output as text
 T  =
  "    -0.8126984   3.3347222   -5.4   4.3402778   -1.778 0.3375   
-0.022   0.0001984"
  "0 + -- + - +  + - + -- + -- 
+ -- + -"
  "   8+%s    7+%s  6+%s 5+%s 4+%s 3+%s   
2+%s    1+%s   "



--> D = F(1,:)./((%s-F(2,:)).^F(3,:))
 D  =

   -0.8126984  3.3347222  -5.4  4.3402778 -1.778  0.3375  
-0.022  0.0001984
   --  -    -  --  -- 
--  -
  8 +s   7 +s 6 +s    5 +s    4 +s  3 +s  2 
+s   1 +s


-->  clean(R-sum(D))
 ans  =

   0
   -
   1

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


[Scilab-users] uman 3.1 is released

2021-12-22 Thread Samuel Gougeon

uman 3.1 is released.

User manual in console. Advanced multimodal and multilingual Scilab 
documentation


 * https://atoms.scilab.org/toolboxes/uman/3.1
   https://atoms.scilab.org/toolboxes/uman/3.1#leave_a_comment

 * Changes: https://atoms.scilab.org/toolboxes/uman/3.1/files/changelog.txt

 * Manuals:
   https://atoms.scilab.org/toolboxes/uman/3.1/files/uman_3.1_en.pdf
   https://atoms.scilab.org/toolboxes/uman/3.1/files/uman_3.1_fr.pdf

Crashes on Scilab 6.1.1 are fixed.
@ mode: New mailing list archives are used. @d will search on dev@lists.
w mode (web): Version 6.1.0 is used for missing online pages v.6.1.1.
The user manual is now available as well in PDF (english, french).
16 improvements & bugs fixed.
26 references added.

Since Scilab 6.1.0, uman can be used in the Advanced console (supporting 
extended characters).


!-!-!-!
If you are installing uman 3.1 while you were already using uman on your 
computer,

please delete your SCIHOME/uman directory before the first run of uman 3.1.
--

Best regards

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


[Scilab-users] Gridding uiframes. subplot and xsetech

2021-12-21 Thread Samuel Gougeon

Dear co-Scilabers,

Scilab 5.5 extended newaxes(handle)  to uiframes 
(uicontrol("style","frame"..)).
From there, the extension of subplot() and xsetech() to uiframes is now 
implemented and is on review for Scilab 6.1.2.


I use to use subplot() and xsetech() on figures.
I hardly understand the interest of uiframes, with respect to figures.
The only interesting feature i see with uiframes is that they can be 
stacked on different tabs in the same figure (*).

Do you use uiframes for other reasons ?

By the way, the layout-grid-gridbag gridding system of uiframes (and 
figures) looks (very) complicated to me. Does it aim to "group" several 
interactive components?
There are a lot of pages about this in the Scilab documentation... It's 
easy to get lost.

While using subplot will still be very simple.

Thanks for any hints or comments about this topic.

Regards
Samuel Gougeon

(*) If we were able to control the docking of figures or other 
interfaces with some code (not interactively), we could do the same by 
docking figures on each others, selectable with tabs, without uiframes.






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


Re: [Scilab-users] console: instruction moving the scrollbar to the top

2021-12-16 Thread Samuel Gougeon

Hello,

Le 02/03/2015 à 23:18, Samuel Gougeon a écrit :

Hello,
Are there any instructions to move the console's vertical scrollbar up 
to the top?

I mean, not the caret (tohome() does it), but the scrollbar.
Even a hack through java/JIMS would be welcome.



Well, this is still a very needed feature : for instance, after a clc() 
and the display of a help page in the console with uman(), going up to 
the top of the console to start viewing the top of  the page would be 
more handy.

Digging a bit among available Java classes:
jimport org.scilab.modules.gui.bridge.CallScilabBridge;
jgetmethods(CallScilabBridge)

shows many interesting (and working) methods addressing the console -- 
including

CallScilabBridge.toHome(); // --
but nothing addressing directly the vertical scrolbar position.
Maybe digging more would work...

Any hints?

The same feature would be useful for uicontrol listbox, as in the right 
pannel of the ATOMS interface, where the description of a selected 
module is displayed. Each time the scrolbar is down to the bottom. 
Having a way to put it at the top would be fine.


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


Re: [Scilab-users] Is http://mailinglists.scilab.org over?

2021-12-15 Thread Samuel Gougeon

Hello Clément,

Le 21/07/2021 à 15:37, Clément David a écrit :

Hello Samuel, hello all,

Indeed we noticed that but where in a hurry delivering the 6.1.1 release. The 
Nabble maintainers stopped the development [1] and started some action to stop 
the service [2]. IMHO we need to switch to another service for archiving and 
searching the Scilab mailing lists. We investigated on Discourse a while ago 
but the operating cost is too costly for us ; there is also an option to have a 
full switch to Mailman v3 hosted services.

Currently there is no free equivalent to Nabble so the mailinglists archive 
might not be available for a time. Hopefully we can ask Nabble maintainers to 
restore the access but it really is a temporary solution.

[1]:https://support.nabble.com/The-Future-of-Nabble-tt7605923.html
[2]:https://support.nabble.com/Downsizing-Nabble-tt7609715.html



Thanks for the news.

After displaying the help home/welcome (or CHANGES) page in Scilab, the 
page's header is made of links on each item:
Scilab Homepage | Online Help | Wiki | Bug Tracker | Forge | Mailing 
Lists Archives | ATOMS | File Exchange


Clicking on "Mailing Lists Archives" leads to 
htt*p**s*://lists.scilab.org/roundcubemail/?_task=login
I have tried to login with my usual LDAP Scilab id and password: 
refused. What is this URL for ?


The same link is proposed at the top of 
https://help.scilab.org/docs/6.1.1/en_US/index.html
but in htt*p*:// instead of https:// Then an automatic redirection leads 
to the removed page http://mailinglists.scilab.org/


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


Re: [Scilab-users] Is http://mailinglists.scilab.org over?

2021-12-15 Thread Samuel Gougeon

Hello,

Le 07/09/2021 à 15:13, Stéphane Mottelet a écrit :

Hi,

is https://www.mail-archive.com/users@lists.scilab.org/ the new place 
to look for the list archives ?


Yes, for users@ and dev@ lists.

This archives interface is poorer than the Nabble  interface, but it 
exists: that's already a major point!


 * Its search engine is welcome, although it is not as handy as the
   former Nabble's one.
   I will use it for the "uman .. @" command in the next uman 3.1
   release (soon).

 * All binary inclusions  -- screenshots of figures, etc -- are simply
   ignored, and without any reference (blank lline). So they become
   completely invisible. This make related messages quite strange,
   since readable comments might become about invisible contents.

 * Apparently, any plain/text attachment is appended to the displayed
   message.

 * The display of the posted code samples may be corrupted, with
   removed \newline. This makes copy/pasting hazardous.
   See for instance
   https://www.mail-archive.com/users@lists.scilab.org/msg10674.html :

   plot3d(t,t,z) gce().thickness = 0;

   There were 2 \newline between plot3d and gce() in the posted and
   received message...
   Apparently, the interface needs semi-colons to not concatenate
   distinct rows..!


Le 07/09/2021 à 15:37, Stéphane Mottelet a écrit :

legacy archive starting in 2007 (and ending in february 2014)

http://lists.scilab.org/pipermail/users/

could be easily uploaded (e.g. mbox format) to www.mail-archive.com



Good idea. Thanks for the reference.

The pipermail archive of enseignem...@lists.scilab.org is already up to 
date (=> 2021):

http://lists.scilab.org/pipermail/enseignement/
For all other lists -- users-fr@, etc -- , indeed these archives stop in 
2013.


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


Re: [Scilab-users] Getting the variable name used for a function input argument

2021-12-06 Thread Samuel Gougeon

Hello Jens,

Le 06/12/2021 à 10:40, Jens Simon Strom a écrit :

Hi Samuel,
Your solution is quite sophisticated. 



On the opposite, it aims to be simpler.


To me it was confusing to call a function without the input being 
bracketed. And on top of this, that a variable of type /constant/ is 
accepted as a /string/ within the function.


As a cherry on the cake, the syntax will work as well for literal values:

function  printc(name)
execstr("c = "+name)
//Drucken einer komplexen Zahl mit Betrag und Winkel/°
  Format  =  strsubst(name,"%","%%")+': %f /_%7.2f°\n'
mprintf(Format,  abs(c),  180/%pi*atan(imag(c),  real(c)))
endfunction

--> printc 3-4*%i
3-4*%i: 5.00    /_ -53.13°


Scilab seems to be more flexible than I would dare to imagine before now. 



Handiness is one of the signatures of high level languages.

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


Re: [Scilab-users] Getting the variable name used for a function input argument

2021-12-05 Thread Samuel Gougeon

Le 04/12/2021 à 20:59, Samuel Gougeon a écrit :


So, /unless you need to know the name *inside* printc() for some 
unsaid purpose/, what would be the difference between in one hand


[name, mag, arg] = printc(myvar, "myvar")

and on the other hand

name = "myvar";
[mag, arg] = printc(myvar)

?



So, after your mail in private, you actually needs the variable's name 
inside the function.

Then, the easiest way to do what you expect could be to pass only the name:

function  printc(name)
  execstr("c = "+name)
  //Drucken einer komplexen Zahl mit Betrag und Winkel/°
  mprintf([name+': %f /_%7.2f°\n'],abs(c),  180/%pi*atan(imag(c),real(c)))
endfunction

--> myVar = 3 - 2*%i
myVar =
3. - 2.i

--> printc myVar
myVar: 3.605551 /_ -33.69°

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


Re: [Scilab-users] Getting the variable name used for a function input argument

2021-12-04 Thread Samuel Gougeon

Hello Jens,

Le 04/12/2021 à 20:39, Jens Simon Strom a écrit :

Hi,
Thanks for all the responses and sorry for not beeing able to answer 
before now.


The background of my question was to write a function for formatted 
output of complex variables in polar form with

mprintf like
function printc(c)

which returns the name of c on calling level, |c|, and the angle.

I understand now that I have to write e. g.

function printc(c,cname)

where cname is the wanted string. This can even give some additional 
freedeom in modifying the output name.



So, /unless you need to know the name *inside* printc() for some unsaid 
purpose/, what would be the difference between in one hand


[name, mag, arg] = printc(myvar, "myvar")

and on the other hand

name = "myvar";
[mag, arg] = printc(myvar)

?
BR
Samuel


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


Re: [Scilab-users] Atoms toolbox : iodelay toolbox by S.steer

2021-11-29 Thread Samuel Gougeon

Le 05/10/2021 à 17:24, Lucien Povy a écrit :


Hello all,

With new version of Scilab >6.1? we cannot use iodelay toolbox : 
problem with %rd_string.



Hello Lucien,

Thanks for reporting this issue.
It is now fixed, and the iodelay toolbox can now be installed and used 
with Scilab 6.1.x


--> atomsSystemUpdate() // to be sure to see recent changes < 1 month
--> atomsInstall iodelay

Best regards
Samuel

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


Re: [Scilab-users] Getting the variable name used for a function input argument

2021-11-27 Thread Samuel Gougeon

Le 23/11/2021 à 21:18, Jens Simon Strom a écrit :


Hi Scilab friends,
Given a numeric variable like xNum as an input argument of a function 
call, how can I produce the variable name string "xNum" within the 
function?



That is requested and commented as the still open report #5840 
 , since 2004.


Samuel

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


Re: [Scilab-users] mesh2d - finding identical points

2021-11-27 Thread Samuel Gougeon

Le 20/11/2020 à 11:46, Stéphane Mottelet a écrit :


Hi again,

Le 20/11/2020 à 11:30, P M a écrit :

OK,
some more background:

I actually want to perform a delaunay triangulation on a set of 
X-Y-Z-coordinates.
I suppose you mean a triangulation of scattered X-Y-Z but you call 
mesh2d with X-Y only ?


I know of CGLAB, but it seems only available to Scilab 6.0.x, while I 
am on Scilab 6.1.0
CGLAB is based on a very old version of CGAL and thus is very hard  to 
maintain as is. There is a lot of work...



We could certainly expect and understand such a -- potentially blocking 
-- remark when porting atoms-CGLAB from Scilab 5 to Scilab 6, where the 
step was very high.


After having ported it successfully to Scilab 6 -- that's great! --, the 
remark is more surprising when dealing with atoms-CGLAB's upgrade for 
further Scilab 6.x versions, whose code does not changes dramatically.


Regards

Samuel

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


Re: [Scilab-users] Getting the variable name used for a function input argument

2021-11-27 Thread Samuel Gougeon

Le 24/11/2021 à 19:34, Stéphane Mottelet a écrit :


Hi,

Le 24/11/2021 à 18:07, Samuel Gougeon a écrit :

Le 24/11/2021 à 09:51, Stéphane Mottelet a écrit :


Hi,

Le 24/11/2021 à 01:42, Federico Miyara a écrit :


I'm not completely sure, but I think this is not possible since 
what is passed to the function isn't a variable but the value 
contained in the variable.
No. Internally, input arguments are passed as references to the true 
object. There is no copy /unless an input argument *is modified*/ in 
the function (in that case a copy with local scope only).



Are you sure about that? Not when they are only reached in read mode?

I might have misunderstood, but i remember a discussion with Clément 
during the last ScilabTech. Clément was categorically stating that 
all input arguments are copied, only and always copied.


It depends on the type of Callable. If you are talking about Scilab 
macros, inputs are (hopefully) never copied. However, if you are 
talking about old-style Scilab 5 C-gateways, yes, there is a wrapper 
that triggers a copy :


https://github.com/opencollab/scilab/blob/master/scilab/modules/ast/src/cpp/types/function.cpp#L333



3 years ago, we were talking about macros in Scilab 6.0.(1)
This huge improvement of Scilab 6 with respect to Scilab 5 can be 
actually tested (below).
As far as i remember,  it was never advertized when Scilab 6.0.0 alpha 
or final version were released. Has it?
Yet, it drastically improves performances, as in many situations huge 
arrays are passed while only a tiny part is extracted and used in the 
function.


So, yes, "hopefully", passed inputs are*/no longer/* copied when only 
addressed, since Scilab 6.

Thanks for having clarified it.


*With Scilab 5.5.2:*

-->a = rand(1000, 1000, 5);

-->function test(aa),b = 1, endfunction
-->tic(); for i = 1:100, test(a); end; toc()
 ans  =
    0.002

-->function test(aa),aa, endfunction   // aa just addressed, without change
-->tic(); for i = 1:100, test(a); end; toc()
 ans  =
3.211

*With Scilab 6.0.0:*

--> a = rand(1000, 1000, 5);

--> function test(aa),b = 1;, endfunction
--> tic(); for i = 1:100, test(a); end; toc()
 ans  =
   0.0003982

--> function test(aa), aa, endfunction
--> tic(); for i = 1:100, test(a); end; toc()
 ans  =
   0.0003522   

--> function test(aa),b = aa(2,2,2), endfunction
--> tic(); for i = 1:100, test(a); end; toc()
 ans  =
   0.0006584

--> function test(aa), aa = 3, endfunction
--> tic(); for i = 1:100, test(a); end; toc()
 ans  =
   0.0003663

--> function test(aa),aa(2,2,2) = 1, endfunction
--> tic(); for i = 1:100, test(a); end; toc()
 ans  =
   1.7976679 as expected


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


Re: [Scilab-users] Getting the variable name used for a function input argument

2021-11-24 Thread Samuel Gougeon

Le 24/11/2021 à 09:51, Stéphane Mottelet a écrit :


Hi,

Le 24/11/2021 à 01:42, Federico Miyara a écrit :


I'm not completely sure, but I think this is not possible since what 
is passed to the function isn't a variable but the value contained in 
the variable.
No. Internally, input arguments are passed as references to the true 
object. There is no copy /unless an input argument *is modified*/ in 
the function (in that case a copy with local scope only).



Are you sure about that? Not when they are only reached in read mode?

I might have misunderstood, but i remember a discussion with Clément 
during the last ScilabTech. Clément was categorically stating that all 
input arguments are copied, only and always copied.


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


Re: [Scilab-users] jetcolormap in param3d1

2021-11-16 Thread Samuel Gougeon

Hello Izabela,

The current colormap is always stored as a figure's property, as shown 
for instance in the examples at 
https://help.scilab.org/docs/6.1.1/en_US/colormap.html

Here is a possible implementation (without the gsort stuff):

X  =  [0.5  1.5  1.5  ;  1.5  2.5  1.5];
Y  =  [0.5  1  1  ;  1  0.5  2];
Z  =  [0  1  1  ;  1  2  3];
clf
param3d1(X,Y,Z);

h  =  gca().children(1).children;

ccm  =  gcf().color_map;
ncurv  =  size(X,2);
ncol  =  size(ccm,1);
// proposal : extending the current color map, instead of replacing it:
gcf().color_map  =  [ccm  ;  jetcolormap(ncurv)];

h.thickness  =  4;
h.foreground  =  ncol+(1:ncurv);  // "vectorized"assignment allowed. for loop 
not required

Hope this helps.
Samuel

Le 15/11/2021 à 13:38, Izabela Wójcik-Grząba a écrit :


Hello,

I need some help with a param3d1 graph. Each polyline should have 
color from a colormap according to the value assigned in a T vector. 
Here is a simple example (not finished):


X=[0.5 1.5 1.5 ; 1.5 2.5 1.5];

Y=[0.5 1 1 ; 1 0.5 2];

Z=[0 1 1 ; 1 2 3];

T=[2 1 3];

[sorted_T, index_sort_T]=gsort(T , 'g' , 'i');

colors=zeros(size(T , 'r');

colors(index_sort_T , :)=jetcolormap(size(T , 'r');

param3d1(X,Y,Z);

h=gca().children(1);

h.children.thickness=4;

for i=size(T,'r')

h.children(i).color=???

end

Instead of question marks there should be a color index, but I don't 
know how to define it using jetcolormap.


I would be grateful for your kind help,

--
Izabela Wójcik-Grząba
Zespół Konstrukcji Metalowych
ZKBiM IIB WIL Politechnika Warszawska



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


Re: [Scilab-users] 6.1.1 startup error

2021-10-18 Thread Samuel Gougeon

Le 22/09/2021 à 17:10, Samuel Gougeon a écrit :

Hello Stefan,

This kind of error might arise when the content of the SCIHOME 
directory of a previous scilab version is copied into the SCIHOME of 
the current 6.1.1 version, for instance to avoid respecifying all 
users preferences.
Unfortunately, when the template of some configuration file is changed 
from one version to the next one, the file must be regenerated.


As reported by Guenther as bug 16778 
<https://bugzilla.scilab.org/16778>, the same error may occur after 
loading a Scilab workspace saved from another version of Scilab 6 (due 
to the bug 16781 <https://bugzilla.scilab.org/16781>).
Indeed, the saved workspace includes SCIHOME, and in Scilab 6 load() 
wrongly overwrites protected variables like SCIHOME.


Samuel

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


Re: [Scilab-users] 6.1.1 startup error

2021-09-22 Thread Samuel Gougeon

Le 22/09/2021 à 18:03, Samuel Gougeon a écrit :

Le 22/09/2021 à 17:35, Clément David a écrit :


Hi Stéphane, hi Samuel, hi all,

The idea behind SCIHOME is to have a version specific directory to 
avoid any issues when upgrading from Scilab versions to Scilab 
versions ; IMHO implementing an upgrade for files stored into this 
directory is for me a non-sense ; the upgrade could be done manually 
(as Samuel described) for the few users that copy the files between 
SCIHOMEs.




IMHO, having a separate SCIHOME directory for each scilab version is fine.



I should have written: this is /definitely/ fine, because it allows to 
install and use several Scilab versions on the same computer. And this 
is a very nice Scilab feature.


Samuel

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


Re: [Scilab-users] 6.1.1 startup error

2021-09-22 Thread Samuel Gougeon

Le 22/09/2021 à 17:35, Clément David a écrit :


Hi Stéphane, hi Samuel, hi all,

The idea behind SCIHOME is to have a version specific directory to 
avoid any issues when upgrading from Scilab versions to Scilab 
versions ; IMHO implementing an upgrade for files stored into this 
directory is for me a non-sense ; the upgrade could be done manually 
(as Samuel described) for the few users that copy the files between 
SCIHOMEs.




IMHO, having a separate SCIHOME directory for each scilab version is fine.
This does not necessarily demand to initialize SCIHOME configuration 
files with "factory files" shipped with the release, at the first run, 
as it is currently done.


This initialization could be done with configuration files of a previous 
most recent Scilab release, provided that configuration files are tagged 
with the scilab version that generated (or upgraded) them as proposed by 
Stephane.

This would improve the continuity of usage.
However, detecting a previous version on the same computer is not so 
obvious.


Currently, scilab user preferences are not extremely numerous, and as 
long as scilab releases won't be more frequent, resetting preferences by 
hand for each release is feasable and not blocking.
But for softwares and freewares that propose frequent upgrades, handling 
the copy or upgrade of configuration files in an automatic way is just 
mandatory.


Samuel

PS: by the way, i thing that, as a general rule, tagging a generated 
file with the (name and) version of the software that generated it is 
wise and dramatically improves files backward compatibility. This could 
be done as well for .scg files (i don't thing they are tagged), .zcos 
files (may be they already are), . dat ones (from save()), etc.


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


Re: [Scilab-users] 6.1.1 startup error

2021-09-22 Thread Samuel Gougeon

Hello Stefan,

This kind of error might arise when the content of the SCIHOME directory 
of a previous scilab version is copied into the SCIHOME of the current 
6.1.1 version, for instance to avoid respecifying all users preferences.
Unfortunately, when the template of some configuration file is changed 
from one version to the next one, the file must be regenerated.


The issue should be fixed either by deleting the 
SCIHOME/configuration.xml file, and regenerating it automatically from 
scratch (quit Scilab and rerun it),
or by editing it and changing or adding the line just before the 
 one, for instance with





Regards
Samuel

Le 22/09/2021 à 12:08, Stefan Du Rietz a écrit :

Hello,
when starting Scilab 6.1.1 with

  $ /usr/local/scilab/scilab-6.1.1/bin/scilab

I get the message:

Startup execution:
  loading initial environment
at line    81 of function xmlGetValues   ( 
/usr/local/scilab/scilab-6.1.1/share/scilab/modules/xml/macros/xmlGetValues.sci 
line 94 )
at line    22 of function help   ( 
/usr/local/scilab/scilab-6.1.1/share/scilab/modules/helptools/macros/help.sci 
line 34 )
at line    14 of function helpbrowser_update ( 
/usr/local/scilab/scilab-6.1.1/share/scilab/modules/helptools/macros/helpbrowser_update.sci 
line 25 )


xmlGetValues: Invalid attribute name: lang.

in Ubuntu Linux after a successful (apart from this) installation from
scilab-6.1.1.bin.linux-x86_64.tar.gz

What can I do?

Regards
Stefan 


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


Re: [Scilab-users] how to get scilab running on mac mini

2021-09-05 Thread Samuel Gougeon

Le 25/08/2021 à 12:27, Mikhail Urusov a écrit :


I have the same problem.
Posted it yesterday with a thorough explanation and screenshots.
But it does not seem even to be posted (200 kbytes due to screenshots).
I am wondering if we can get any help?
Kind regards,
Mikhail Urusov

Am Mi., 25. Aug. 2021 um 01:08 Uhr schrieb rgf >:


I have been running Scilab for 10 or 15 years on generations of
Apple platforms, encountering difficulties with Java at every
stage.  I can’t get Version 6.1.1 to run on mac mini, and the user
lists are down. Is any help extant or pending?
...

Ray Finucane
ray.finuc...@gmail.com 
925.724.4040

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




Never received from users@
Not a single message from users@ received since

Le 16/08/2021 à 18:00, Jakub Kopac wrote about [Scilab-users] 
uiDisplayTree - close figure

and this one
Le 25/08/2021 à 12:27, Mikhail Urusov wrote

Other messages from April to June not received while detected on former 
Archives (to rebuild threads partially received).
With no more public archives, communication on users@ looks no longer 
reliable.


Samuel

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


Re: [Scilab-users] Redrawing a maximized figure changes its original size and other problem

2021-09-05 Thread Samuel Gougeon

Le 02/09/2021 à 02:22, Federico Miyara a écrit :


Dear All,

I've noticed that when clearing the contents of a maximized figure 
using clf() and redrawingthe figurefrom scratch,the maximized 
statuschanges status to normal with a size slightly larger than the 
available height of the screen.



I am not able to reproduce this effect on Win10.


.../...
The second problem is that upon creation, any figure is located flush 
with the bottom of the screen, even if I have enabled that the task 
bar is always visible. This causes the bottom of the figure to be 
hidden behind the task bar. To make it vissible I need to manually 
move the figure upwards.


The expected behavior would be that the window were completely visible 
from the beginning.



I don't think so. This would require to set a priority between the 
default figure size and default figure position, in a way that anyone 
could clame as debattable. As a user you are already able to tune and 
set the default values of figures properties in your startup file, 
according to your own user's screen and wishes, noticeably .axes_size 
and .figure_position


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


Re: [Scilab-users] disable grid in 3d plot

2021-08-30 Thread Samuel Gougeon

Le 29/08/2021 à 05:40, Federico Miyara a écrit :


Dear All,

Is there any way to disable the grid on a surface generated using 
plot3d() or similar?


Sometimes it is useful, but when the grid where the data to plot are 
defined is too tight the black lines on the surface are way too 
invasive and the general appearance is almost black. I would expect a 
smooth surface, something like Sgrayplot() but in 3d.



Setting .thickness=0 is likely the simplest way to do it.

Using the first plot3d() example:

// simple plot using z=f(x,y)
t=[0:0.3:2*%pi]';
z=sin(t)*cos(t');
plot3d(t,t,z) gce().thickness = 0;

Samuel


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


Re: [Scilab-users] Loop query

2021-08-15 Thread Samuel Gougeon

Le 15/08/2021 à 11:28, Lester Anderson a écrit :

Hello Samuel,

The size of ns (number of steps) and seq (sequence of values) are 
variable depending on the integer input, and this seems to be one issue.


For this reason, seq must be a list, leading to

function  [ns, seq] = collatz(p)
seq  =  p
while  %T
if  pmodulo(p, 2)
p  =  p*3+1
else
p  =  p/2
end
seq  =  [seq  p]
if  p==1
ns  =  length(seq)
break
end
end
endfunction

prime = primes(20); [ns, seq] = ([],list()); for  i  =  1:length(prime)
[ns(i),  seq(i)]  =  collatz(prime(i));
end --> ns' ans = 2. 8. 6. 17. 15. 10. 13. 21. --> seq seq = (1) = [2,1] 
(2) = [3,10,5,16,8,4,2,1] (3) = [5,16,8,4,2,1] (4) = 
[7,22,11,34,17,52,26,13,40,20,10,5,16,8,4,2,1] (5) = 
[11,34,17,52,26,13,40,20,10,5,16,8,4,2,1] (6) = 
[13,40,20,10,5,16,8,4,2,1] (7) = [17,52,26,13,40,20,10,5,16,8,4,2,1] (8) 
= [19,58,29,88,44,22,11,34,17,52,26,13,40,20,10,5,16,8,4,2,1]


Samuel


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


Re: [Scilab-users] Loop query

2021-08-15 Thread Samuel Gougeon

Le 15/08/2021 à 09:00, Lester Anderson a écrit :

Hello,

Basic query. I have a simple code that applies the Collatz conjecture 
equation (3n+1) by running a function and then runs a loop over the 
values stored in prime (the first 8 Prime numbers):


clear
exec('collatz.sci',-1);

prime  =  primes(20);

for  i  =  1:length(prime)
 [ns,  seq]=collatz(prime(i))
end
As it stands, this just runs to the end (i=8) and the value 19. How 
can I get the code to write the results of each loop pass into the 
variables ns and seq, such that each contains the results of the 8 passes?



This runs all the 8 iterations, but each next iteration overwrites ns 
and seq.

What are the sizes of ns and seq ?


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


[Scilab-users] fullpath * crashes 6.1.1

2021-07-23 Thread Samuel Gougeon

Hello,

Le 10/07/2021 à 23:37, Samuel Gougeon a écrit :

Le 10/07/2021 à 16:11, Samuel Gougeon a écrit :

Hello Federico,

I confirm this issue. It appeared in Scilab 6.1.0 and  occurs only 
when pwd() and the filename are on the same disk.
It comes from a change of behavior of mopen(), and so may occurs for 
many other functions using mopen().


Regards
Samuel



fullpath() -- that was changed in january 2020 -- is the final guilty:

--> pwd
 ans  =
  "D:\Softs"

--> fullpath("D:\test.wav")
 ans  =
  "D:\Softs\test.wav"



unlike Scilab 6.1.0, Scilab 6.1.1 on Windows crashes with

*fullpath("SCI\modules\core\macros\*.sci")*

The crash occurs only a) when the path exists, AND b) * is used in the 
filename.


It was still not the case with the dev branch of 2021-07-07, that is the 
last build available for windows, 7 days before fullpath was fixed for 
the hereabove issue.


This noticeably kills uman(), at least its refresh "r" option that is 
also run automatically at initialization and every change of the local 
ATOMS list.


And i guess many other codes.

Samuel



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


Re: [Scilab-users] indexing array of rationals

2021-07-22 Thread Samuel Gougeon

Hello

Le 22/07/2021 à 22:08, Stéphane Mottelet a écrit :

Hi all,

I thought indexing an array of rationals was possible. Likely this is 
no possible and this is a pity


--> pi
 pi  =

  θ +2θ²
    --
    1 +4θ +3θ²

    0.333θ
   
   0.333 +θ

    0.333θ
   
   0.333 +θ

  θ +2θ²
    --
    1 +4θ +3θ²

--> pi(1)
 ans  =

  "r"  "num"  "den"  "dt"

Any clue, somebody ?



The special syntax pi(1,0) does it since 6.0.2, as documented @ 
https://help.scilab.org/docs/6.1.1/en_US/rational.html




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


[Scilab-users] Is http://mailinglists.scilab.org over?

2021-07-21 Thread Samuel Gougeon

Le 19/07/2021 à 09:56, Dang Ngoc Chan, Christophe a écrit :

Hello Samuel,


De : users  De la part de Samuel Gougeon
Envoyé : jeudi 8 juillet 2021 08:01

That's strange : do you confirm that this thread and following ones (*) look no 
longer archived @
http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html

I confirm I don't see the topic "Native arm64 build for Mac M1" in the list 
either.



Thanks Christophe.
The same applies to the users-fr@ list, on which last messages posted on 
8th and 9th of July about "newaxes et subplot" were not archived.


Finally, since yesterday, the whole http://mailinglists.scilab.org 
website is unreachable.

We can't ignore the coincidence with the release of 6.1.1 the same day.

Scilab has no longer official truly public mailing lists, and former 
archives as a knowledge database for 25 years and all corresponding 
existing cross-references look over.


Samuel

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


Re: [Scilab-users] Scilab 6.1.1 release

2021-07-21 Thread Samuel Gougeon

Hello,

While the help is complete in the Scilab help browser, 38 help chapters 
over 55 are missing in the online version of the help @ 
https://help.scilab.org/docs/6.1.1/en_US/index.html and for other languages.

Are missing

 * all chapters from the modules Linear algebra  to Signal processing 
   : Linear algebra, Interpolation, CACSD, Polynomials, Signal processing
 * all chapters from Special functions to XML : Special functions,
   Statistics, Sparse, UMFPack, Optimization, XML
 * Input/Output functions
 * all chapters from the modules Parameters to Advanced functions :
   Parameters, Strings, Sound, Time, Output functions, Xcos,
   Spreadsheets, Console, History, Matlab I/O, M2sci, MEx
 * .. Windows tools, ATOMS, TcL/Tk, Scinotes, UI data
 * .. Modules manager, Multilinguism, API Scilab, call_scilab API
 * .. JVM, Java interface, Préferences
 * slint, web tools

Samuel

Le 20/07/2021 à 15:35, Clément David a écrit :

Dear Scilab users,

We are pleased to announce the release of Scilab 6.1.1 as a joint effort 
between Scilab contributors and the Scilab team at ESI Group.

Scilab 6.1.1 is the first revision of the 6.1 development branch and is 
compatible with the 6.1.0 release. It fixes 156 bugs and implements missing 
features from the 6.1.0 version especially:

* Improve readability on plot's title and displayed values
* Fix crashes and slow behaviors on functions
* Add missing arguments and behaviors to existing functions
* Reword and add examples on many help pages

For the complete list of changes and bugs fixed, please take a look at the 
CHANGES file https://help.scilab.org/CHANGES

Download this brand new version at https://www.scilab.org/download/6.1.1

--
Clément DAVID on behalf of the Scilab team.
___
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] spectrogram

2021-07-12 Thread Samuel Gougeon

Hello Federico,

As reported at http://bugzilla.scilab.org/16530 , mapsound() could not 
really be used.

It has been rewritten in Scilab 6.1.1.
It's help page in PDF is available at 
http://bugzilla.scilab.org/attachment.cgi?id=5178
To be compared to the last 6.1.0 former version 
https://help.scilab.org/docs/6.1.0/fr_FR/mapsound.html


It could be still improved later with additional suggested features.

Regards

Samuel

PS : A redirection mechanism to be set in user's preferences has been 
implemented in Scilab 6.1.1
to automatically redirect help queries in the help browser toward the 
most relevant page, as uman() does.
It has been designed first to help scilab newbies coming from other 
languages, but can also be used

for other common terms.
Even if it is not "standard", mapsound is explicit enough, in the right 
help section,  and OK to me.

So we could redirect spectrogram to mapsound.

Le 12/07/2021 à 01:21, Federico Miyara a écrit :


Dear All,

I noticed there is no spectrogram function in Scilab that provides 
both graphic and numerical output. There is a function mapsound(), 
which plots a spectrogram without numerical information and without 
control over important aspects such has FFT length or windowing 
function. By the way, in the field of digital sound processing the 
usual name for this is spectrogram, not mapsound, which is a bit 
confusing.


I created a spectrogram() function. Even if it doesn't yet comply with 
the recommended style for Scilab functions (particularly regarding 
error handling or manual page), I think it might be useful for some 
users. I attach the function and a test script.


Regards,

Federico Miyara


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


Re: [Scilab-users] Question on saving with wavwrite()

2021-07-10 Thread Samuel Gougeon

Le 10/07/2021 à 16:11, Samuel Gougeon a écrit :

Hello Federico,

I confirm this issue. It appeared in Scilab 6.1.0 and  occurs only 
when pwd() and the filename are on the same disk.
It comes from a change of behavior of mopen(), and so may occurs for 
many other functions using mopen().


Regards
Samuel



fullpath() -- that was changed in january 2020 -- is the final guilty:

--> pwd
 ans  =
  "D:\Softs"

--> fullpath("D:\test.wav")
 ans  =
  "D:\Softs\test.wav"

Samuel

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


Re: [Scilab-users] Fwd: avoid auto-zoom when rotating a 3D graphic

2021-07-10 Thread Samuel Gougeon

Hello,

Le 07/07/2021 à 10:09, Stéphane Mottelet a écrit :


Hello Philipp,

The feature did exist until Scilab 5 family but was removed.

I have never seen this in Scilab 4, 5 or 6. 3D rotations have always 
been prone to some stretching of the axes in order to fill the more as 
possible the axes_bounds whatever are the rotation_angles, isoview and 
cube_scaling values.
Could you provide a sample running on Scilab 5 and preventing this 
stretching?

Thanks.

Samuel


x  =  [0:0.3:%pi]';
y  =  [0:0.3:2*%pi];

z  =  sin(x)*cos(y);
[xx,yy,zz]  =  genfac3d(x,y,z);
plot3d(xx,yy,zz)

for  iv  =  ["off"  "on"]
ax.isoview  =  iv;
for  cs  =  ["off"  "on"]
ax.cube_scaling  =  cs;
for  a  =  0:3:720,  ax.rotation_angles(2)  =  a;  sleep(100);  end
end
end

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


Re: [Scilab-users] Question on saving with wavwrite()

2021-07-10 Thread Samuel Gougeon

Hello Federico,

I confirm this issue. It appeared in Scilab 6.1.0 and  occurs only when 
pwd() and the filename are on the same disk.
It comes from a change of behavior of mopen(), and so may occurs for 
many other functions using mopen().


Regards
Samuel

Le 16/06/2021 à 00:32, Federico Miyara a écrit :

Dear all,

I try to save a signal as a wave file, using wavwrite(), to the root 
directory of the drive where I have declared the default directory. 
Unexpectedly, the wave file is saved to the default directory. For 
instance:


My default directory:

D:\work_scilab

My command:

wavwrite(x, Fs, "D:\test.wav")

The resulting path to my file:

D:\work_scilab\test.wav

instead of

D:\test.wav

I wonder if I making some mistake.

Thank you.

Regards,

Federico Miyara


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


Re: [Scilab-users] Native arm64 build for Mac M1

2021-07-08 Thread Samuel Gougeon



That's strange : do you confirm that this thread and following ones (*) 
look no longer archived @
http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html 
?

They do not appear amongs most recent topics:

(*)  At the current time,

 * Fwd: avoid auto-zoom when rotating a 3D graphic
 * scilab 6.1 and ubuntu 20.04 no graphics ?



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


Re: [Scilab-users] Undocking windows

2021-06-18 Thread Samuel Gougeon

Hello,

Le 18/06/2021 à 18:28, Stefan Du Rietz a écrit :

Hello,
how can I make all my Scilab windows not dockable?
And how can I get rid of the toolbars?

I can do both with figure windows.


Fine. So,  with "all your Scilab windows" are you addressing the 
console, the help browser, the file browser, xcos windows, etc ?

Or GUIs based on figures like the ATOMS GUI, the demos GUI, etc?


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


Re: [Scilab-users] Variable scope in Scilab

2021-05-10 Thread Samuel Gougeon
Anyway, to me this topic looks (very) much less critical than the (bug 
or intentional?) disabling of funcprot() in Scilab 6.


In Scilab 6, on one hand all "control" keywords 
select/if/then/else/return/ etc are now protected. On the other hand, 
funcprot() no longer works and makes fragile all native macros and 
builtin symbols... A very inconsistent and impacting roadmap.


Putting Scilab in students hands is much more prone to errors due to 
this unprotection, than due to external initializations..


Samuel

Le 10/05/2021 à 21:41, Samuel Gougeon a écrit :

Hello,

Le 26/02/2021 à 14:38, Stéphane Mottelet a écrit :

Hi all,

In Scilab the scope of variables is quite permissive but even in 
Julia (really strict rules) we can have the following behavior:

.../...


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


Re: [Scilab-users] Variable scope in Scilab

2021-05-10 Thread Samuel Gougeon

Hello,

Le 26/02/2021 à 14:38, Stéphane Mottelet a écrit :

Hi all,

In Scilab the scope of variables is quite permissive but even in Julia 
(really strict rules) we can have the following behavior:


function y=f(x)
 y=x+a;
end

a=1;
f(2)
a=2;
f(3)

-> a=1;

--> f(2)
 ans  =

   3.

--> a=2;

--> f(3)
 ans  =

   5.

Yesterday afternoon I was my students for a Scilab beginners tutorial, 
and by accident one of them had "x" defined before in the main 
workspace and tried to call f without arguments. I reproduce the 
experiment here by explicitely defining x before the call:


x=1;
f

--> x=1;

--> f
 ans  =

   3.

Allowing the function inner scope to see variables of the outer scope 
is one thing, you may or may not agree this is not the point here, but 
allowing to call f without arguments just because the formal input 
parameter has the same symbol as an outer scope symbol is another 
thing. I knew this was possible even if i never used such a feature, 
but my students were so puzzled by this, particularly those who 
already learned other low-level languages, that I decided to propose 
the suppression of this, that I consider as a serious potential source 
of many bugs. Don't tell me that this would break some user code 
because I frankly have no consideration for this kind of crappy 
shortcut and, sorry if it may sound rude, for programmers who use it...



If low-level languages would be mandatory references imposing all their 
constrains, Scilab and other high level languages would not exist. Most 
often, the same people knowing "only" low level languages do not 
understand vectorized syntaxes and prefer to write as many explicit 
(nested) /for/ loops as needed. Very nice... :-/


About the topic: likely, i would not consider input and output arguments 
in the same way:

*
Input arguments*: As soon as external variables can be seen from the 
function, i do not see fundamental differences between an input argument 
-- that technically speaking can always be optional --, and any other 
internal variable. /It's the author's responsibility to properly test 
and initialize input arguments as is. We can't replace this 
responsability with an exception to a general scoping rule./
Accepting that the result can be built from external objects out of the 
list of input arguments.. already weakens the specific role of these 
ones (by the way as in object oriented programming, where operands are 
most often class attributes "in an external context" out of the list of 
input arguments). You propose to "reinforce" the strictness of their 
role, but without weakening the accessibility of external objects. 
Doesn't it look  a bit arbitrary, and vain? I don't think it would make 
programming neither easier nor really more "reliable".


*Output arguments*: they are more clearly expected to be products of the 
function, not of anything else.  Initializing them from outside looks 
more awkward and tricky.


My two cents..
Regards
Samuel


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


Re: [Scilab-users] Curing scf() & figure() slowliness: a good target for Scilab 6.0.1

2021-05-10 Thread Samuel Gougeon

Le 25/02/2017 à 18:05, Samuel Gougeon a écrit :

Hello,

Opening a new empty figure (without drawing anything) is a so common 
elementary task and it has become so long that i have built a short 
benchmark about it from Scilab 4.1.2 to Scilab 6.0.

Detailed results are here-below. The main conclusions are the following:

 1. with no pre-existing figure,*scf**() is **20 times slower in **5.5
and 6.0 than in *its best performances in *5.3.0*. On my computer,
it takes 0.062 s with 5.3.0 and 1.3 s now (5.5.2|6.0).
Scilab 5.4.0, 5.4.1 and 5.5.0 have dramatically damaged performances.
The loss is even 10x bigger with figure(): it is ~200 times slower
with Scilab 5.5 & 6.0 than with Scilab 4.1.2

 2. Since Scilab 5.5.0, the time taken to open a new figure increases
linearly with the number of already opened figures. On my
computer, opening the first one (after loading scf()) takes 1.8 s,
and opening the 20th one takes almost 10 s. This is still the case
with Scilab 6.0.

*Detailled results: *

 1. Opening the first figure :
Only 2 tests are reported with figure() instead of scf().
t=0;  for  i=1:50,  tic();  scf();  t=t+toc();  xdel();  end;  t,  t/50
  [s]  [s]  4.1.2 base  figure()
6.0.0  :  62.39/50   1.24818.5 2.32
5.5.2  :  73.62/50   1.4723   21.8
5.5.0  :  69.94/50   1.3988   20.8
5.4.1  :  37.33/50   0.7466   11.1
5.4.0  :  24.07/50   0.4814   7.14
5.3.0  :  3.102/50   0.0620   0.92
5.1.0  :  4.069/50   0.0814   1.21
4.1.2  :  3.370/50   0.0674   1.00 0.014
 2. Opening 20 figures :
t=[];  for  i=1:20,  tic();  scf();  t(i)=toc();  end;  sum(t)/20

6.0.0  :  5.30  [1.35  =>  9.51]
5.5.2  :  5.68  [1.77  =>  9.92]
5.5.0  :  5.66  [1.82  =>  9.85]  range from the #1 to #20
5.4.1  :  1.18
5.4.0  :  0.923
5.3.0  :  0.110
5.1.0  :  
4.1.2  :  0.0774


Samuel



This issue is fixed in Scilab 6.1.0, on Windows 10. Fortunately.
Here are the current Scilab 6.1.0 performances (on another computer than 
in 2017):


It is still ~5x slower than with Scilab 4.1.2 (on the same computer),
but it no longer depends on the number or figures currently opened.

Samuel

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


Re: [Scilab-users] Problem with ascii()

2021-05-07 Thread Samuel Gougeon

Hello,

Le 07/05/2021 à 08:57, Federico Miyara a écrit :


Dear all,

If I run this simple code

ascii([ascii("hello"), 13,10, ascii("world")])

Scilab crashes.


Do you get a crash if you prevent displaying the result with a final 
semi-colon?


Le 07/05/2021 à 09:26, Jean-Yves Baudais a écrit :
On Scilab 6.1.0.1582621796 


IMHO, that's the question. Some things were fixed for the last year 
about /the display/ of ascii(13), that actually sometimes crashed.

In the nightly built version, i get the expected display:

--> ascii([ascii("hello"), 13, 10, ascii("world")])
 ans  =
  "hello
world"

Regards
Samuel

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


Re: [Scilab-users] How to list the content of the recursion stack?

2021-05-06 Thread Samuel Gougeon

Hello Jean-Yves,

Le 06/05/2021 à 11:13, Jean-Yves Baudais a écrit :

.../...
test_ll improves a bit test_l because it uses tail call, but the max 
without seg.fault is far from 1000. Where does this limit of 1000 come 
from?


from
--> currentMaxDepth = recursionlimit()
 currentMaxDepth  =
   1000.

set by default in the user's preferences:
https://help.scilab.org/docs/6.1.0/en_US/recursionlimit.html

A recursion can be triggered in a involontary way according to a quite 
indirect and complex path. That was the case i have met. I have fixed it 
with a lot of spying pause() and disp().

But it's not really a way of working...

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


Re: [Scilab-users] spec can crash scilab

2021-05-04 Thread Samuel Gougeon

Le 04/05/2021 à 16:38, Antoine Monmayrant a écrit :


Yes, it does the same

So this bug is still a problem, at least on Ubuntu.
Can you guys try to run spec.tst on his machine and comment on 
https://bugzilla.scilab.org/show_bug.cgi?id=15330 ?




Besides, how confusing and messy the notations on the spec () 
documentation page are! ...


 * R defined twice but differently among arguments
 * L defined among arguments but not used in syntaxes
 * Q and Z used in syntaxes but not described among arguments
 * al, be used in descriptions, instead of alpha and beta listed in
   arguments
 * E used in the description, but not in arguments nor in syntaxes...

and so on..
In addition, notations differ from a language version to another one...
Some clarification is urgently required.

In next release, eigs() -- mainly based on the former Arnoldi module, 
that becomes internal -- is listed in the same help section. Have you 
tried it?


Samuel

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


Re: [Scilab-users] Java String.format(format, value) within Scilab

2021-05-04 Thread Samuel Gougeon

Le 04/05/2021 à 16:13, Stéphane Mottelet a écrit :


Hi,

format() is a  class method, not an instance method.

Thanks for the tip. However, distinguishing both types of methods in the 
java documentation (list of methods) is not trivial to me..




However, the following does not work either:
--> String.format("%6.2f", -3.1415926)

Undefined operation for the given operands.
check or define function %eo_e for overloading.


So, still to be explored..

Samuel

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


[Scilab-users] Java String.format(format, value) within Scilab

2021-05-04 Thread Samuel Gougeon

Dear all,

May be the question is only about Java, or may be about how Scilab 
implements it.


In order to do some tests to fix the regression brought by Scilab 6 and 
reported as the major bug 16376  about 
how datatips display (big or) small values (all displayed as 0 instead 
of using an exponential notation), i am trying to use the 
java.lang.String 
 class 
and its .format() method 
, 
in Scilab language.


Indeed, the java.text.DecimalFormat class used for datatips has no 
/self-adaptative format similar to the "%g" printf one/ (that 
automatically chooses the normal or exponential numerical notation 
according to the magnitude of the absolute value to display), while the 
String class provides this .format() method, with all printf formatting 
conventions 
, 
including the "%g" one.


Now, even about only the Java side, something is unclear to me:
The official documentation of the String class presents .format() as a 
String method, not as a String constructor.
If so, then .format should be applied to a predefined String. But which 
one? What is done with it? It could be the String format, but this one 
is provided as an explicit input of the method...


--> jimport java.lang.String
--> s = String.new()
 s  =

--> s.length()   // OK, this works
 ans  =
  0

--> s.format("%6.2f", -3.1415926)
Undefined operation for the given operands.
check or define function %eo_e for overloading.

--> s = String.new("%6.1f")
 s  =
%6.1f

--> s.format(-3.1415926)
Undefined operation for the given operands.
check or define function %eo_e for overloading.

Yet, the .format method is actually listed among all String's methods:
--> or(jgetmethods(String)=="format")
 ans  =
  T

Using the java.text.DecimalFormat class to fix the bug will anyway be 
possible, with explicit conditions on the magnitude of the value to 
display. But i would like to understand this error about String.format().


Any hint is welcome.

Regards
Samuel

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


[Scilab-users] How to list the content of the recursion stack?

2021-05-04 Thread Samuel Gougeon

Dear all,

When we get a Recursion limit reached (1000) message, does anyone know 
how to know more about which recursive calls are filling and overflowing 
the recursion stack?


Noticeably, the message does not tell anything about the last 
instruction that yielded the error.

This makes debugging quite hard.

Using debug() to follow 1000 nested calls is just not possible.
The debug page says "launch execution with stop on error". But then, in 
debug mode,  "e whereami" does not display anything, as in normal mode.


Thanks
Regards
Samuel

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


Re: [Scilab-users] Toolboxes startup

2021-04-26 Thread Samuel Gougeon

Le 26/04/2021 à 14:51, Samuel Gougeon a écrit :

Le 26/04/2021 à 14:15, Stéphane Mottelet a écrit :

.../...

Such a wish was reported 10 years ago as bug 6801 
<https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/bugzilla.scilab.org/show_bug.cgi?id=6801>.


To me, the only way to overcome any mprintf or disp made in *.start 
files of external modules would be to become able to redirect the 
standard output to null (or anywhere else as in a file, as with 
diary, that forks the stream instead of redirecting it).
I don't think that %toolboxes aims to become public. 
atomsGetInstalled() and atomsGetLoaded() (and others) would likely 
be more suited to test the atoms status.


For contribution,
Samuel


Yeah that's the idea. But better than redirection of the standard 
output, all the stuff displayed in the .start file should go in a 
Journal, to which display methods can be associated. So instead of 
explicitely calling disp or mprinf, etc. the .start script should 
just add some stuff + associated verbosity level to the journal. What 
would be actually really displayed


Whatever is the method -- redirection of stdout to a file or special 
diary  --, i am afraid that the analysis of contents vs verbosity would 
then be done only after completing the whole loading process.
This would prevent displaying information in a progressive way : 
immediately after loading macros, then after loading the documentation, 
etc... that will anyway be required in some occasion.



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


Re: [Scilab-users] Toolboxes startup

2021-04-26 Thread Samuel Gougeon

Le 26/04/2021 à 14:15, Stéphane Mottelet a écrit :

.../...

Such a wish was reported 10 years ago as bug 6801 
.


To me, the only way to overcome any mprintf or disp made in *.start 
files of external modules would be to become able to redirect the 
standard output to null (or anywhere else as in a file, as with 
diary, that forks the stream instead of redirecting it).
I don't think that %toolboxes aims to become public. 
atomsGetInstalled() and atomsGetLoaded() (and others) would likely be 
more suited to test the atoms status.


For contribution,
Samuel


Yeah that's the idea. But better than redirection of the standard 
output, all the stuff displayed in the .start file should go in a 
Journal, to which display methods can be associated. So instead of 
explicitely calling disp or mprinf, etc. the .start script should just 
add some stuff + associated verbosity level to the journal. What would 
be actually really displayed will depend on the level of the used 
Journal. That's the way the output is controlled in Ipopt, for example 
(but at the C++ level).


We can't prevent authors to actually add and use mprintf or/and disp in 
their .start external file. They will be always free to use such 
statements  in the .start file template instanciated for their actual 
toolbox.
Now, if for instance a special syntax and parsing on .start comments is 
proposed, it could be comprehensive enough to be actually and 
exclusively used.
But, likely, only static information would be possible in comments. 
Formatted information like with printf placeholders could not be provided.


By the way, i am not sure that the most compact display should be the 
default mode. Out of the only module name, information displayed when 
loading might be important.


We tend to consider these displays as boring. But i am wondering that 
this is because loading can be quite long... unrelated to the display.
When working afterward in the session, any displayed matrix or handle 
gets most often immediately taller in the console than any initial 
autoloading information (that occurs only once).

So, to me, this is not really critical.

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


Re: [Scilab-users] Toolboxes startup

2021-04-26 Thread Samuel Gougeon

Hello,

Le 26/04/2021 à 09:41, Stéphane Mottelet a écrit :


Hi all,

I just made available for macOS and Linux the toolboxes stixbox 
depends upon for macOS (distfun and linalg) and my remark is that when 
a lot of modules are loaded at startup then the output can become very 
long and sometimes messy, since we don't impose a normalized output:


*Scilab branch-6.1 (Apr 19 2021, 23:19:29)**
*

*Start Distfun**
**
**Start Helptbx**
**
**Start Specfun**
**
**Start Makematrix**
**
**Start Apifun**
**    Load macros**
**    Type "help apifun_overview" for a quick start.**
**
**Start Linalg**
**
**Start Stixbox*

I would rather expect something like:


*Scilab branch-6.1 (Apr 19 2021, 23:19:29)**
*

*Start modules: Distfun, Helptbx, Specfun, Makematrix, Apifun, Linalg, 
Stixbox.*


*--> *

The verbosity level of the output (with the above default) could be 
defined in user preferences, and checked in module startup script in 
order to output the required amount of information.


That's just a propostion to be discussed, of course.



Such a wish was reported 10 years ago as bug 6801 
.


To me, the only way to overcome any mprintf or disp made in *.start 
files of external modules would be to become able to redirect the 
standard output to null (or anywhere else as in a file, as with diary, 
that forks the stream instead of redirecting it).
I don't think that %toolboxes aims to become public. atomsGetInstalled() 
and atomsGetLoaded() (and others) would likely be more suited to test 
the atoms status.


For contribution,
Samuel

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


  1   2   3   4   5   6   7   8   9   10   >