Re: [Scilab-users] How to let scilab do what matlab can do?

2012-09-10 Thread sgougeon
Hello,

>.../...
>But I have found some function that can be used in matlab can’t be used in 
>scilab, like “rectpulse()”

recpulse(x,n)
// can be done with

x.*.ones(n,1)

// Example:

-->x=grand(3,2,'uin',0,20)
 x  =
2. 15.  
18.3.   
20.7.   
 
-->x.*.ones(4,1)
 ans  = 
2. 15.  
2. 15.  
2. 15.  
2. 15.  
18.3.   
18.3.   
18.3.   
18.3.   
20.7.   
20.7.   
20.7.   
20.7.   
 

>”factor()”. 
?
Same with Scilab:
help.scilab.org/docs/current/en_US/factor.html

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


Re: [Scilab-users] Displaying an image in a subplot

2012-09-12 Thread sgougeon
>Thanks a lot for this hint. With this function it works.
>Did you report the bug to the scilab bugzilla? 

The forge where it is reported is the only relevant place, since IPD is an 
external module.
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] root calculation + function crash

2012-12-13 Thread sgougeon
>NB : in case of “division by zero” in a function, is it possible to generate a 
>specific code in order to avoid program crash ? 

ieee(2)
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Plots on second Y axis

2013-02-08 Thread sgougeon
Hello,

according to your needs, you may do either:

plot2d()
ax = gca();
ax.y_location = 'right';

or

demo_gui() // then Graphics => 2D & 3D => plotyy | plotyyy
// and look at the code, using 
help newaxes // http://help.scilab.org/docs/5.4.0/en_US/newaxes.html

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


Re: [Scilab-users] Quadrature Mirror Filters

2013-02-15 Thread sgougeon
>Can there is an example of reception of a spectrum of a signal through
>wavelet transformation, whether there are functions in Scilab wavelet of
>transformations. DWT, CWT...

Scilab ressources for wavelets processing are available here:
http://atoms.scilab.org/toolboxes/swt
http://atoms.scilab.org/toolboxes/Wavelab

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


Re: [Scilab-users] Array of struct

2013-02-28 Thread sgougeon
Hello,

here is what i get with a similar example:

-->v=struct("b",%t,"r",%pi,"t","Hi")
 v  =
   b: %t
   r: 3.1415927
   t: "Hi"
 
-->w = struct("b",%f,"r",%e,"t","Hola")
 w  = 
   b: %f
   r: 2.7182818
   t: "Hola"
 
-->v($+1)=w
 v  = 
2x1 struct array with fields:
   b
   r
   t
 
-->v(2)
 ans  =
 
   b: %f
   r: 2.7182818
   t: "Hola" 
 
-->v.t
 ans  =
   ans(1)
 Hi   
   ans(2)
 Hola   

It looks to works as expected. It is hard to help you without 
knowning more about the structure that you use. Could you post 
some lines of code that fail and that could be copied/pasted
for test?

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


Re: [Scilab-users] Array of struct

2013-02-28 Thread sgougeon
>De: "Stanislav" 
>Hi.
>The size function does not work with structures (see help).

It does (despite it is not documented): on the example that 
i posted:
-->size(v)
 ans  = 
2.1.  

It works also on 2D-arrays of structures

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


Re: [Scilab-users] Array of struct

2013-03-01 Thread sgougeon
>Maybe "pts($+1) = temp" is not the correct way to append the whole of the
>struct in an existing struct, but I haven't found a way to do this so far.




>Update: just realised that "pts($+1,:) = temp". Is that the correct way to do 
>it?

//a : is actually needed, but here:

pts($+1) = temp(:)

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


Re: [Scilab-users] Array of struct

2013-03-01 Thread sgougeon
>//a : is actually needed, but here:
>pts($+1) = temp(:)

Sorry amiege, i have forgotten clearing pts before issuing this command,
and its result is not the expected one. By the way, what's the expected
result? Do you wish 
a) to add temp(1:$) as a whole, as a _single_ new element of pts(), or
b) to add each element temp(i) as a new corresponding element in pts($+i),
   in a "distributive" way?

In the latter case, the (whole) following does the job:

pts = struct();
temp(1).partnumber = 1;
temp(1).P = zeros(8,3);
temp(1).C = zeros(96,5);
temp(2).partnumber = 2;
temp(2).C = zeros(96,5);
temp(2).P = zeros(8,3);

s = size(pts,"*");
st = size(temp,"*");
pts(s+1:s+st) = temp(:) // pts($+1:$+st) can't be used


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


Re: [Scilab-users] Array of struct

2013-03-01 Thread sgougeon
>pts(s+1:s+st) = temp(:) // pts($+1:$+st) can't be used, even with parentheses 
>($+1):($+st)

// but pts($+(1:st))  can! :

pts = struct();
temp(1).partnumber = 1;
temp(1).P = zeros(8,3);
temp(1).C = zeros(96,5);
temp(2).partnumber = 2;
temp(2).C = zeros(96,5);
temp(2).P = zeros(8,3);

st = size(temp,"*");
pts($+(1:st)) = temp(:)   // works
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Array of struct

2013-03-01 Thread sgougeon
>>amiege wrote:
>> I would prefer to have the whole of the struct temp to be pts($+1), so
>> that pts(i) contains all the information related to the data file that has
>> been parsed, so I think that's a). pts(i) would then be a struct which
>> would match what temp is or was when it was constructed.
>> 
>> I will try the various solutions suggested and report back which one works 
>> best.


>>amiege wrote:
>seems to work. 

Not as a). For this, since you do not need that pts has some fields,
a cell would be preferable (by the way, i did not know nor find any
way to do it with pts as a struct). This will give:

pts = cell()   // A cell instead of a struct

temp(1).partnumber = 1;
temp(1).P = zeros(8,3);
temp(1).C = zeros(96,5);
temp(2).partnumber = 2;
temp(2).C = zeros(96,5);
temp(2).P = zeros(8,3);


pts(size(pts,"*")+1).entries = temp   // pts($+1).entries addressing fails
pts(size(pts,"*")+1).entries = temp
pts(2).entries


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


Re: [Scilab-users] declaration of uint8 matrix

2013-03-13 Thread sgougeon
Hello Stéphane,

>De: "Stéphane Mottelet" 
>Is it possible to declare a uint8 matrix without first declaring it as a 
>double ? ../..


Yes, you can do:

-->ui = resize_matrix(uint8(0),5,3)
 ui  =
 
  0  0  0  
  0  0  0  
  0  0  0  
  0  0  0  
  0  0  0  
 
-->typeof(ui)
 ans  = 
 uint8   

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


Re: [Scilab-users] declaration of uint8 matrix

2013-03-13 Thread sgougeon
>../.. Maybe would it be a good idea to extend the syntax of uint8 (and others) 
>like
ui=uint8(5,3) ?

Yes, such a feature would be useful. IMO it would be better to rather extend 
zeros(), 
ones(), and eye() with an optional input parameter "typeof" (text):

zeros(X, "uint8")
ones(m, n, p, "int16")
...

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


Re: [Scilab-users] Using try and catch

2013-04-09 Thread sgougeon
- Mail original -
>De: "laurent berger" 
>Envoyé: Mardi 9 Avril 2013 17:30:08
>.../...
>Scilab console is blocked.You have to used ctrlc C and abort. I do  not
>understand why
>Thanks you for your help

This may be connected to the bug 
http://bugzilla.scilab.org/show_bug.cgi?id=6555,
reporting what Antoine writes.

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


Re: [Scilab-users] Anyone controlled a scope or similar instrument?

2013-04-15 Thread sgougeon
- Mail original -
>De: "Michael Dunn" 
>Envoyé: Lundi 15 Avril 2013 04:03:54
>Objet: [Scilab-users] Anyone controlled a scope or similar instrument?
>
>I see there's an ATOMS category for instrument control, though it all looks 
>like low-level stuff. 
>Has anyone actually talked to a scope or similar device? I'd love to automate 
>capture transfer. 
>
>Python has PyVISA, so that might be the simplest route. Maybe even as an 
>intermediary between 
>SciLab & the instrument??? 

Here is an example for an oscilloscope:
http://fileexchange.scilab.org/toolboxes/234000

Other examples (function generators, etc):
http://fileexchange.scilab.org/categories/instruments_control

Anyway, you will have to write a Scilab driver for each instrument,
since the manufacturer will unlikely provide it, except the protocol.

Then, please just post your driver on FileExchange, in order to increase
the public database :-)

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


Re: [Scilab-users] What is a valid function name in Scilab?

2013-04-16 Thread sgougeon
Hi Antoine,

As Rakshith Nayak wrote, in Scilab, functions are a type of variables,
so are some variables. Therefore, naming rules for functions are the 
same as for other variables. These rules are described at 
-->help names
http://help.scilab.org/docs/5.4.1/en_US/names.html
Indeed, i agree that some links to this page could be added in the 
See also section of the function's and functions ones :
http://help.scilab.org/docs/5.4.1/en_US/functions.html
http://help.scilab.org/docs/5.4.1/en_US/function.html

It is possible for any user sharing this feeling to post updated 
xml help related files onto bugzilla.

Regards
Samuel


- Mail original -
De: "Antoine Monmayrant" 
Cc: "International users mailing list for Scilab." 
Envoyé: Mardi 16 Avril 2013 10:19:51
Objet: Re: [Scilab-users] What is a valid function name in Scilab?

Thanks for your quick answer. 
I think I was not really clear in my post: I am not looking for general good 
practices in naming your functions or variables, but for the actual, hard-coded 
limitations in Scilab for function names. 
But your answer was useful as the info I was looking for is available at 'help 
names'. 
Thanks again, 

Antoine 

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


Re: [Scilab-users] Subplot question

2013-05-13 Thread sgougeon
>Hello,
>I want plot data and divided the plot region with the subplot command in 6 
>regions (subplot(3,2,X)) but I would like to use the first 2 regions 
>(subplot(3,2,1) and subplot(3,2,2)) for 1 plot. 

Just do simply: subplot(3,1,1)   // whenever you want: after, before, or 
interlaced with other subplots
to target the desired area.

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


Re: [Scilab-users] operations on a DAG

2014-02-28 Thread sgougeon
Hello,
Metanet might be your friend:
http://atoms.scilab.org/toolboxes/metanet
It should be available through the ATOMS module manager (open box icon in the 
console toolbar).
Regards
Samuel


- Mail original -
De: "rasleendeol" 
À: users@lists.scilab.org
Envoyé: Vendredi 28 Février 2014 08:07:28
Objet: [Scilab-users] operations on a DAG

i have implemented a directed acyclic graph in Matlab n would like to know
how to perform operations such as to find critical path, bottom-level,
top-level...etc.
also, clustering needs to be done based upon the critical paths.

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


Re: [Scilab-users] Plotting problem - subplot with 2 y-axis

2014-05-13 Thread sgougeon
Hello Wolfgang,

If you were dealing about the mismatch between both axes frames:
This is a side effect of the new axes.auto_margin attribute.
In order to fix it in your example, you may just add
a1.margins = a.margins;

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


Re: [Scilab-users] function find()

2014-05-27 Thread sgougeon
Hello,

>// initialisation
>diam = 0.2;
>nd = 10;
>etat = (rand(nd,2) -0.5)*4;
>distance = zeros(nd,nd);
>//compute distance matrix
>for i = 1:(nd-1)
> for j = (i+1):nd
> distance(i,j) = 
> sqrt((etat(i,1)-etat(j,1))**2+(etat(i,2)-etat(j,2)**2));
> end
>end

You may do without explicit nested loops:

[X,Y] = meshgrid(etat(:,1), etat(:,2));
distance = sqrt((X-X.').^2 + (Y-Y.').^2)

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


Re: [Scilab-users] interpreting showprofile results

2014-10-22 Thread sgougeon
Hello Candio,
I just caught it: add_profile() prepares the function to profiling. But then, 
the profile is really set when calling the function. Each new call cumulates 
the execution time and occurrence numbers for each line. In your case, you did 
not call the function at all before asking to display its profile. After 
add_profile, and before any profile display (profile, showprofile, ..), just 
call the function ; actually execute it. Then, you will see its profile 
actualized with non-null results.
Regards
Samuel

- Mail original -
De: "Candio" 
À: users@lists.scilab.org
Envoyé: Mardi 21 Octobre 2014 22:42:42
Objet: Re: [Scilab-users] interpreting showprofile results


In the meantime, I did try to multiply by 1000, but it appears that the results 
are identically equal to 0 - not just off an order of magnitude. 

format(20); 
profile(myfun) 
ans = 

0. 0. 0. 
0. 0. 0. 
0. 0. 4. 
0. 0. 4. 
0. 0. 4. 
0. 0. 4. 
0. 0. 4. 

ans(:,2) = ans(:,2)*1000 
ans = 

0. 0. 0. 
0. 0. 0. 
0. 0. 4. 
0. 0. 4. 
0. 0. 4. 
0. 0. 4. 
0. 0. 4. 
0. 0. 4. 


-->ans(:,1) 
ans = 

0. 
0. 
0. 
0. 
0. 
0. 
0. 


Candio 

On Tue, Oct 21, 2014 at 8:55 AM, Candio [via Scilab / Xcos - Mailing Lists 
Archives] < [hidden email] > wrote: 


Hi Samuel, 

Thank you for your reply. I am using SciLab 5.5.1. 

I will try to multiply the results by 1000; in the meantime, since this bug 
should be fixed in the version I downloaded, please let me know if there's 
something else I can do. 

Candio 




If you reply to this email, your message will be added to the discussion below: 
http://mailinglists.scilab.org/interpreting-showprofile-results-tp4031384p4031409.html
 


To unsubscribe from interpreting showprofile results, click here . 
NAML 


View this message in context: Re: interpreting showprofile results 
Sent from the Scilab users - Mailing Lists Archives mailing list archive at 
Nabble.com. 

___
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] linux command line

2015-02-11 Thread sgougeon
Hello,

>I would like to give, in Scilab, a linux command line. It's possible? 
>
>For example mv file1.txt file2.txt 

yes, you may use one of the unix..() or host() functions:
http://help.scilab.org/docs/5.5.1/en_US/section_7182261dbbb2bb2293bb9166ba5f1fb3.html

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


Re: [Scilab-users] Strange figure behaviour

2015-05-13 Thread sgougeon
>De: "Stefan Du Rietz"
>Envoyé: Mercredi 13 Mai 2015 12:19:01
>
>Hello all,
>can anybody explain this:
>I have a figure f with two axes (and some GUIs). When I move the mouse 
>with the right button pressed, *one* of the axes gets distorted.

Right-click rotates interactively the axes on which you have clicked.
To restore it (and all), you may do:
f = gcf();
k = f.children.type=="Axes"
f.children(k).view="2d";

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


Re: [Scilab-users] ”Too complex recursion”

2015-05-19 Thread sgougeon
Hello,

- Mail original -
.../...
plCtrlEX1=intg(xmin_V,xTrig_V-%eps,list('payoffDenFunc',payD_V,fxValDate,fxTriger,fxFixed,mu,vol));

In the list, you may try specifying directly by its name the function to be 
integrated, rather than through a string giving its name:

plCtrlEX1=intg(xmin_V,xTrig_V-%eps,list(payoffDenFunc,payD_V,fxValDate,fxTriger,fxFixed,mu,vol));

May be the documentation is not clear enough about this point.

Regards

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


Re: [Scilab-users] Accidentally displaying huge matrices

2015-05-26 Thread sgougeon
>btw how can you overload the display of double matrices ?

you can redefine disp(), but AFAIK it is not possible to overload the default 
display for native types such as booleans, decimal or complex numbers, 
strings...
For instance, if you define %s_p(), it won't never be called when displaying a 
matrix of decimals or complexes.

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


Re: [Scilab-users] how to respond the shrinkage of hyper-matrix

2015-06-24 Thread sgougeon
>I suppose  'Yasp' is  one which is in the following address.
>
>https://www.scilab.org/development/nightly_builds/yasp
>
>Am I right 

Yes you are


>and can I install Yasp in the same PC where Scilab 5.5.2 has been already 
>installed?

Yes, you may have as many Scilab versions as needed on the same PC, and you may 
run simultaneously as many Scilab sessions in any available Scilab version, as 
needed.
The only limit is just the required RAM ;)

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


Re: [Scilab-users] Strange behavior of interpln function

2015-09-14 Thread sgougeon
Hello,

>x1=[-1604,-23982,-31978,-38883,-45638,-52660,-59782,-60536,-67648,-75176,-82997,-92066,-101438,-110067,-119852,-130754,-142046,-153749,-165495]
>y1=[0.01,0.04,0.05,0.06,0.07,0.08,0.09,0.091,0.1,0.11,0.12,0.13,0.14,0.15,0.16,0.17,0.18,0.19,0.2]
>yy1=interpln([x1;y1],0)

--> help interpln
Description:
 given xyd a set of points in the xy-plane which increasing abscissae...


-->[x1,k] = gsort(x1,"g","i"); 
-->y1 = y1(k);
-->yy1 = interpln([x1;y1],0)
 yy1  =
0.0078497  

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


Re: [Scilab-users] read format

2015-10-13 Thread sgougeon
Hello,

- Mail original -
>De: "CHEZE David 227480" 
>
>.../... Would you need to get the timestamps data, you may call csvRead with 
>"string" conversion and process the first column of the matrix of string to 
>retrieve numeric value fields. 

For this part, using mfscanf() as suggested by Serge will be more 
straightforward, instead of csvRead().

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


Re: [Scilab-users] Title positioning on log-scale plots

2015-11-25 Thread sgougeon
Hi,

>Does anybody know how to [ x,y ]-position titles on log-scale plots? 

This is a regression since Scilab 5.5.0, as well reported here for X and Y 
labels: http://bugzilla.scilab.org/13518

>On a related matter, is it possible to use figure coordinates to position 
>titles (instead of the axes coordinates)? 

Actually, the normalized axes scale would be the best -- as when specifying 
gca().margins --, instead of the data scales.
The figure coordinates would not be handy in case of subplots.

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


Re: [Scilab-users] Title positioning on log-scale plots

2015-11-25 Thread sgougeon
>Does anybody know how to [ x,y ]-position titles on log-scale plots? 

After some trials without searching for the involved bugged piece of code, it 
comes that the title is wrongly displayed at X = 10*( gca().title.position(1) - 
1)

So, to display it from X=1 on your first graph, you must set 
gca().title.position(1) = 1.1

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


Re: [Scilab-users] Set default working directory at start

2015-12-01 Thread sgougeon
This feature has been added to Preferences in Scilab 5.5. You may upgrade to 
5.5.2.
It then allows as well to set the starting directory equal to the one that 
Scilab left in the previous session.
Very handy.

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


Re: [Scilab-users] Loop query - Scilab 5.5.2

2016-01-18 Thread sgougeon
Hello,


>for Te = 5000:25000:1 // start:end:step to make 5000, 15000, 25000

The syntax is start:step:end, not start:end:step

https://help.scilab.org/docs/5.5.2/en_US/colon.html

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


Re: [Scilab-users] Padarray Matlab equivalent in Scilab

2016-02-10 Thread sgougeon
>Thanks for the ideas, it kind of solves the need, but pads to left and bottom 
>only:

tmp = [data ; repmat(data($, :), addedRows, 1)];
paddedMat = [tmp  repmat(tmp(:, $) , 1, addedCols)]

padds on the bottom and RIGHT.
To pad on the left and top, just tune the concatenation:

tmp = [repmat(data($, :), addedRows, 1) ; data];
paddedMat = [repmat(tmp(:, $) , 1, addedCols) tmp]


Every side combination is possible.

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


Re: [Scilab-users] global constant definition for module

2016-03-03 Thread sgougeon
Hello,

>De: "David Chèze" Jeudi 3 Mars 2016 10:19:23
>.../... by the way, I found that genlib and lib are doing very similar things 
>maybe the same things

Not really: AFAIK, genlib() builds a library of macros, whereas lib() only 
loads such a library.
However, we could ask to merge lib() in load() and remove it. BTW, it would 
remove the ambiguity 
about the "official" name of a library: a name is provided when  building the 
library with genlib()
(say "myGoodieslib"); and another one is used as LHS parameter when loading the 
library with lib()
(say "myGoogies_lib"). Removing this duplicate and ambiguity would be fine.

Samuel Gougeon

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


Re: [Scilab-users] global constant definition for module

2016-03-03 Thread sgougeon
>De: Samuel GOUGEON,  Jeudi 3 Mars 2016 11:56:15

>However, we could ask to merge lib() in load() and remove it. 

I should have written:
We could ask to merge lib() in load() and UNDOCUMENT lib() in order to make it 
an internal.
(and obviously avoid any back-compatibility issue: lib() is heavily used, like 
load())

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


Re: [Scilab-users] Matrix: mix string and float

2016-03-04 Thread sgougeon
Hello,

>De: "anna78"  4 Mars 2016 14:45:10
>.../...
>Is it possible to build a matrix with different element types?

This is called a cell array. 
In your case, since each column is homogeneous, you may as well store the 13 
matrices simply in a list: M = list(M1,M2,..,M13).
The most appropriate container -- cell array or list -- depends on which kind 
of operations you wish to do afterwards with M's components.

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


Re: [Scilab-users] A generic datastructure dump tool?

2016-03-29 Thread sgougeon
>De: "scilab 20 browseruk" 
>Objet: [Scilab-users] A generic datastructure dump tool?
> .../...
>I have a "working" version (and have had several others), but they all suffer 
>from the 
>same problem: namely that in order to redraw the line I have to redraw the 
>entire graph, 
>which defeats the point of the exercise which is to see how varying each of 
>the 
>coefficients affects the line. The process of re-draw is so slow that you 
>can't see what changes.

Hello,
After getting the handle PL of your polyline, you can directly update its 
points through PL.data
Then, the graphics is directly updated. You don't need to redraw it with plot() 
ot plot2d().

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


Re: [Scilab-users] How to find the number of polylines automatically

2016-05-02 Thread sgougeon
Hello,

>De: "Jens"
>Hi,
>By the line
>
>for i=1:n; ca.children(i).children.foreground=5; end
>
>one can change all level lines of a 2D contour plot to red. But how can the
>script find n (without manual trial and error)?


With 
length(ca.children) 
?
I may miss something...

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


Re: [Scilab-users] How to find the number of polylines automatically

2016-05-02 Thread sgougeon
>De: "Jens Simon Strom"
>
>You didn't miss anything. I did: I tried size but I did not try length 
>although it is so self-evident.

size(ca.children,1) // works as well
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] ticks labels with coma instead of dot for decimal separator

2016-05-17 Thread sgougeon
>De: "grivet"
>Envoyé: Mardi 17 Mai 2016 11:57:32
>Objet: Re: [Scilab-users] How to find the number of polylines automatically
>
>Hello,
>Is it possible, within Scilab 5.2, to display tics_labels in European 
>format, i.e. with commas instead of points as
>decimal separators ?

Hello,

As far as i know, gca().ticks_format does not allow to change the decimal 
separator.
However, you can post-process default labels with strsubst():

x = linspace(0,2,100);
plot(x, sin(x))
ax = gca();
ax.x_ticks.labels = strsubst(ax.x_ticks.labels,".",",");
ax.y_ticks.labels = strsubst(ax.y_ticks.labels,".",",");
ax.font_size = 3;

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


Re: [Scilab-users] type/typeof bug ?

2016-06-07 Thread sgougeon
Hello Philippe,

>I work with matrix of polynomials, but some coefficients could be scalar. 

?
Each coefficient _is_ a scalar.

>I though that I could differentiate real and polynomial coefficients
>comparing their type, surprisingly  type(A(i,j))=2
>whatever the nature of A(i,j)  (see example below). Is this a bug ? 

No, it's not a bug

>For my applications i have a "work around "  comparing their degree .

Yes, it is the proper way to proceed


>-->L=[X 0 1] // a matrix
> L  =
>x 01

When you concatenate polynomials and numbers, numbers are automatically 
converted into polynomials of degree 0.
This is the same as when you concatenate 
 * booleans and decimal numbers (result as decimal)
 * real and complex numbers: reals are converted into complex numbers with 
imag==0.
 * polynomials and rationals (result as rational)
The output type is the richest one.

However, this general rule does not apply to encoded integers: Each inttype may 
be concatenated only with itself.
These rules are presented in the "help brackets" page in review
https://codereview.scilab.org/#/c/17924/13/scilab/modules/core/help/en_US/1_keywords/brackets.xml

HTH
Samuel

PS: I don't know why all integer types are considered as exceptions requiring 
undefined overloads:
-->[1 int8(1)]
   !--error 144 
Undefined operation for the given operands.
check or define function %s_c_i for overloading.

There are 8 inttypes, so there should be 8x7x2 = many combinations of 2 
inttypes, plus combinations with non integer types, and as many overloads.
Unless a "generic" overload is defined and used as soon as one integer is 
involved.
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] plot2d question

2016-07-03 Thread sgougeon
>- Mail original -
>De: "Offe rPade"
>À: users@lists.scilab.org
>Envoyé: Dimanche 3 Juillet 2016 17:58:21
>
>I could not use plot for drawing a semilog graph. So I am using plot2d, 
>but if I want the curve to have both linestyle and markers, 
>I have to draw the curve Twice, like: 

Sure not. One of the properties may be set independently after plotting, say 
the x-log flag:
Use plot() as usual:

clf
t = 0:%pi/20:2*%pi;
t(1) = [];
plot(t,sin(t),'ro-.')

// then
ax = gca();
ax.log_flags = "ln";

// or simply
// gca().log_flags = "ln"; with Scilab 6
// That's it


>Plot2d(x,y,1,logflag=’ln’) for the line 
// beware about the capital: plot2d instead of Plot2d

Samuel
PS : see also http://bugzilla.scilab.org/14191
I will propose to implement the "ll".. etc  flag as in plot([axes],["ln"],..), 
for Scilab 6.
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] replacing sed command by regexp ?

2016-07-11 Thread sgougeon
- Mail original -
>De: "Clément David"
>Envoyé: Vendredi 8 Juillet 2016 14:37:18
>
>Hello Philippe,
>
>About replacing "%foo_" to "foo_" in a file, I crafted an example using 
>strsplit() and strcat() (see
>attached) but it might be good to have an extended strsubst() that can output 
>groups (\1 in your
>regexp).
>
>Do not hesitate to report a bug on that,

Done there:
http://bugzilla.scilab.org/9123
http://fileexchange.scilab.org/toolboxes/294000
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] using web command

2016-07-11 Thread sgougeon
- Mail original -
>De: "Offe rPade"

>In matlab gui, I used the following command: 
>stat = web(['\help\propagation.htm'], '-browser') 
>to get to my help files. 
>Is there a similar command in scilab? 

You may try browseURL(): 
https://fileexchange.scilab.org/toolboxes/453000

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


Re: [Scilab-users] strange error with "rat"

2016-09-02 Thread sgougeon

Hello Philippe,

Le 2016-09-02 13:10, philippe a écrit :

Hi to all,


I use rat to do integer simplifications in vectors (if possible).  I 
use

it like this

-->[n,d]=rat(2/14)
 d  =

7.
 n  =

1.

but I have a strnage error when rat is called  from another (very
complex) function :


***

-->[D,P,txt]=diagonalisation(A,'txt', variables, 'M')

 !--error 246
Fonction non définie pour le type d'argument donné,
  Vérifier les arguments ou définir la fonction %s_rat pour la 
surcharge.

at line  38 of function vector2int called by :
at line  95 of function matrix2noyau called by :
at line  61 of function eigenvector called by :
at line  83 of function diagonalisation called by :


I've checked that the argument of rat is a constant (it's -1/2), but I
can't reproduce the bug out of this context!?!?

Does anyone have any idea of what could have happened ?


When the %s_ overload is called, it is often due to some unsupported
complex values (even with null imaginary parts: only the encoding 
matters).

So, you may check before calling rat() that its input argument is not
of complex type , with isreal(x).

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


Re: [Scilab-users] Again: On the PC, Scilab does not find the C compiler

2016-09-19 Thread sgougeon
>De: "Heinz Nabielek"
>"Scilab doesn't find a C compiler": I have 64 bit Scilab 5.5.2 in 64 bit 
>Windows10
>and a working Microsoft Visual Studio 2014, but Scilab does not find the C 
>compiler.
>All the Scilab commands asking for compilers have a negative response.
>
>What to do?
>
>Heinz

You may support this thread: http://bugzilla.scilab.org/12355
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Functions lib

2016-09-23 Thread sgougeon
- Mail original -
De: "Dang Ngoc Chan, Christophe"

>Hello all, hello Samuel,
>
>> De : Samuel Gougeon
>> Envoyé : vendredi 23 septembre 2016 11:00
>>
>>> * a file named "name" (without any extension), which is an ascii file
>>> containing the names of the functions;
>>
>> That's true, this is required for Scilab 5, and no longer for Scilab 6.
>> [...]
>> This is not enough. The "lib" file is also required. It is generated with 
>> genlib(..)
>
>I did not try to create a library recently,
>but the help still mentions the "names" file
>(BTW I forgot the "s")
>https://help.scilab.org/docs/6.0.0/en_US/lib.html
>and does not mention any lib file.
>
>When reading the help page for genlib
>https://help.scilab.org/docs/6.0.0/en_US/genlib.html
>I understand it is an automated process to create the bin files,
>but it does not either mention any lib file.
>
>Maybe the help pages need an update?
>(Or maybe I need to read more cautiously.)

IMO, as already mentionned on this forum, lib() looks almost useless.
load() does exactly the same, except that it does not allow to rename
on loading the loaded library. It names it according to its default
name declared when compiling it.
But i never met circumstances where the default name was a problem.
Rather, most often we try to guess what is the default name of the library
to use it as LHS output of lib().

Yes, "help lib" is outdated.
"help genlib" actually speaks about the "lib" file:
"When all .sci files have been processed, genlib creates a library variable 
named lib_name and saves it in the file lib in dir_name."

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


Re: [Scilab-users] Plot with two different y-axis as one plot

2016-09-26 Thread sgougeon
Hello,

>De: "Frieder Nikolaisen"
>Envoyé: Lundi 26 Septembre 2016 13:27:35
>Objet: [Scilab-users] Plot with two different y-axis as one plot
>
>Dear Sir or Madam,
>
>I want to print a Diagramm with two different y-axis and one x-axis. I 
>want to zoom both plots at the same time after plotting. With my Code, I 
>only zoom the secound plot. How could I plot it in a propperway?

Assuming that you are speaking about the interactive zoom: 
This bug that was a regression from Scilab 5.4.0 was greatly fixed
by Caio during the last Google Summer Of Code.
You may download the nightly built release and use it for this purpose:
http://www.scilab.org/fr/development/nightly_builds/master

>.../...
>
>I would even like to have four y-axis, two of both sides in the same 
>Color as the graph. How to do this?

What do you mean by "2 on both sides"?
In Scilab, AFAIK, it is not possible to choose the side of each axis
on which ticks and labels are drawn. There is a trick to do that,
but it's neither straightforward nor handy.

In the demos, there is a Graphics => Plot 2D and 3D => plotyyy
example for plotting 3 y-axes with 3 different scales.
You may see its code and mimic it.

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


Re: [Scilab-users] Plot with two different y-axis as one plot

2016-09-26 Thread sgougeon
>De: "Frieder Nikolaisen"
>.../...
>I do use the ScilabHelp, but I cannot find a plotyyy. That isn't the Demos?

no. To get and use the demos manager, you may run
--> demo_gui

>.../... In this case, if I zoom in after 
>plotting, that might be called interactiv, I only zoom in the later 
>plotted graph, not both. So I cannot compare both Graphs, because they 
>are now related to two "different" x-axis. 

Sure. This is the bug fixed last summer.
Installing the most recent nightly release of Scilab takes 3 mn
and does not require uninstalling your running stable 5.5.2 release.
You may have as many different Scilab installed versions as you want,
in parallel. This is a common situation for developers or others.

>There isn't a plotyyy function in SciLab, only the workaround?
It is not a work-around. A native plotyyy() is not really needed.
Then why not a plot, ploty, plotxx, plotxxx, plotxxyy, etc? 
Such a collection would be quite meaningless.
Only the fact that you can build the desired multiaxes plot function
of your dream and needs is meaningful. Scilab enables you to do so.


>> What do you mean by "2 on both sides"?
>
>Having four Graphs with four different y-axis (instead of only two). 
>It's quite common in my field of engineering.

Would you have a snapshot of such a plot?
When there are really many plots sharing the same x-axis for different y
scales, another solution is to use subplot(n,1,i) instructions with
multiple plot2d(x, yi) with the shared x absissae.

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


Re: [Scilab-users] Plot with two different y-axis as one plot

2016-09-28 Thread sgougeon
Hello,

>I did attach a plot, now 20kB, of a pump from an old exam. The plot 
>does provide SI dimensions as well as US ones. Thats why there are three 
>x-axis and two y-axis.

For this kind of case where
 * you want different axes _for the same data_
 * all expected axes are linear (not logarithmic),
drawaxis() can be used to add extra axes, instead of newaxes().

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


Re: [Scilab-users] ignore function output variable

2016-11-10 Thread sgougeon
Hello Christoph,

If you are searching for a one-char recipient, for instance "?" or "#" or "%" 
are valid starting chars for a name of identifier (variable).
So
[#,o]= getversion()  // works, as well as
[?,o]= getversion()  // or
[%,o]= getversion()

However, the first argout is actually assigned (and possibly displayed). AFAIK, 
this can't be presently avoided.

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


Re: [Scilab-users] ignore function output variable

2016-11-10 Thread sgougeon
>SG: However, the first argout is actually assigned (and possibly displayed). 
>AFAIK, this can't be presently avoided.

Humm, actually it aims to work in Scilab 6, but it is bugged:

--> h = zeros(5,3,2);
--> [s1,,s3]=size(h)  // no error
 s3  = 
   3.   // wrong: 2 expected
 s1  = 
   5.

--> [,s2]=size(h)
[,s2]=size(h)
  ^
Error: syntax error, unexpected ","


A pity. Still hoping for it. No need of "~", just skip with "[,.." or "..,,.."
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] pinkification of xs2jpg exported images

2016-11-17 Thread sgougeon
>driver JPG; 
>xinit test.jpg; 
>surf (); 
>f = gcf (); 
>f.figure_size = [1000 800]; 
>xend winopen test.jpg 
>
>Scilab freezes and I don't know where or if test.jpg is saved. 

If you really write 
xend winopen test.jpg

winopen and test.jpg are taken as xend() arguments.
The space is not a separator between consecutive instructions.

xend
winopen test.jpg

should work as expected instead, or

xend, winopen test.jpg

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


Re: [Scilab-users] Lack of Scatter type plots in scilab

2016-11-18 Thread sgougeon
>Hi Rafael,
>
>Thank you for letting me know about drawlater() and drawnow() functions.
>I tried them and waited about 2 minutes, nothing drawn , so I restarted the
>run without them. 

After plotting the frame and before plotting dots, you may turn the axes 
invisible with
ax = gca();
ax.visible = "off";

It does pretty the same as drawlater()

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


Re: [Scilab-users] Understanding the graphic hierarchy. Copy a figure

2016-11-21 Thread sgougeon
Hello Jens,

The proper way to copy graphics is to use copy(). Example:

f = scf();
plot2d()
f.tag = "plot2d() example";
fc = copy(f); // Creates (and render) the copy
fc.tag=="plot2d() example"

HTH
Samuel Gougeon

- Mail original -
De: "Jens Simon Strom"
À: users@lists.scilab.org
Envoyé: Lundi 21 Novembre 2016 14:32:42
Objet: [Scilab-users] Understanding the graphic hierarchy. Copy a figure


Hallo,
The script below is to make f2 a copy of f1. However f2 is empty although its 
axes, compound, and polyline data look as expected. 
(Version 5.5.2) xdel ( ) ; xdel ( ) ; f1 = figure ( 1 ) ; plot ( 1 : 3 , 1 : 3 
) ca1 = gca ( ) //axes with one compound child
// f2 = figure ( 2 ) ; ca2 = gca ( ) //axes without children ca2_ = ca1 //axes 
with one compound child ca2_c = ca2_ . children //compound with one polyline 
child ca2_cc = ca2_c . children //polyline, same as in ca1 How can the polyline 
be made visible? 

Regards 
Jens 










___
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] Axis break with Scilab ?

2016-11-22 Thread sgougeon
Hello Antoine,

This is an interesting user case. It is quite easy to get an equivalent, even 
smarter,
but it depends on what is really required. here,
 * There is no overlay between the 4 curves. The technical solution would be 
quite specific.
 * The vertical scale is different from one y section to another one.
   IMO this is quite embarrassing (not from a technical point of view, but from 
a reader one. It can easily mislead the reader).
 * we don't know if the sampling step is constant for each curve, and whether 
it is the same from one curve to another one.

In practical, xsetech(), drawaxis(), and/or the fact that data with %nan values 
are skipped in plots could be used to achieve such a rendering.

Best regards
Samuel

- Mail original -
De: "Antoine Monmayrant"
À: users@lists.scilab.org
Envoyé: Mardi 22 Novembre 2016 13:31:07
Objet: [Scilab-users] Axis break with Scilab ?

Hi all,

I just got a question from one of my colleagues: "Is this possible to get axis 
breaks when plotting with Scilab?"
(ie a plot where a bit of the scale in x, y or even both is missing, see : 
http://www.originlab.com/doc/Tutorials/Multiple-Axis-Breaks ).
As far as I know, I don't see any direct way to do it.

Am I wrong?

As for workaround, I think one could achieve similar results with subplots and 
visible/hidden axis, but it would require a bit of overhead ...

Cheers,

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


Re: [Scilab-users] ?==?utf-8?q? Axis break with Scilab ?

2016-11-23 Thread sgougeon
>But anyway, with subplots, I haven't found a reliable way to get "zoom 
>synchronization" across several  subplots...

This feature was broken since Scilab 5.4.0, but is repaired in Scilab 6.0-b: 
the zoom box can again be dragged and set over several subplots.

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


Re: [Scilab-users] Axis break with Scilab

2016-11-24 Thread sgougeon
>De: "Antoine Monmayrant"
>
>OK, that's what I understood from your last post but saddly it does not work 
>on my setup with scilab-6.0.0-beta-2.
>I tried on two different machines under linux (ubuntu 16.04 64bits) and it 
>does not work.
>I cannot start the zoom box  outside of the axis rectangle, let alone strech 
>it to the next subplot.
>What os are you working on?
>

Le Jeudi, Novembre 24, 2016 19:24 CET, Samuel Gougeon a écrit: 
>> All this is impossible with 5.4.0 <= Scilab <= 6.0-b2.

http://www.scilab.org/development/nightly_builds/master

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


Re: [Scilab-users] getting the name of a variable from its handle

2016-12-06 Thread sgougeon
Hello,

>- Mail original -
>De: "christophk"
>Envoyé: Mardi 6 Décembre 2016 14:43:25
>
>Ok here is another question for the Scilab experts around.
>Is there a way to convert the name of a variable into a string in Scilab?
>
>Lets say, I have:
>s = 2;
>
>//then:
>string(s) // returns "2"
>//is there a function f with f(s) == "s" ??

This is rather getting the variable name from the variable handle

AFAIK, this is possible only if s is the handle of a Scilab function (so called 
"macro"), i.e. a function written in Scilab language and compiled.

Example with the existing sind() function:
t = macr2tree(sind); t.name
// It works even with aliases:
s = sind;  // with no (): we copy the handle into s
s(45)
t = macr2tree(s); t.name

-->t = macr2tree(sind); t.name
 ans  =
 sind   
 
-->// It works even with aliases:
-->s = sind; // with no (): we copy the handle into s
-->s(45)
 ans  =
0.7071068  
-->t = macr2tree(s); t.name
 ans  =
 s   

>Searched the web, but could only find a solution for Matlab:
>https://se.mathworks.com/matlabcentral/newsreader/view_thread/251347

I do not clearly understand what is done there. No results are displayed..
I don't know any equivalence of inputname() in Scilab.

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


Re: [Scilab-users] labels for 2 y-axes in plot

2017-03-10 Thread sgougeon

>now I see there is also a function
>*drawaxis*.
>Is it possible to get a *handle* of the X-axis alone to modify the color and 
>appearance of only one axis?

As indicated in its help page, just use the drawaxis output:

HandleOfMyAdditionalAxis = drawaxis(..);
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Replace multiple occurrences of regular expression in string with strsubst

2017-03-27 Thread sgougeon
- Mail original -
>De: "Pierre Vuillemin", Lundi 27 Mars 2017 09:57:01
>
>Hi all,
>
>It seems that when using regular expressions with strsubst, only the 
>first occurrence is replaced. For instance,
>
>tst_str  = 'This is a cow. A cow is funny.'
>out1 = strsubst(tst_str, 'cow', 'rabbit')
>out2 = strsubst(tst_str,'/cow/','rabbit','r')
>disp(out1) // both occurence are replaced -> ok
>disp(out2) // only the first occurence is replaced -> strange?
>
>Is it the intended behaviour?

No, but after years of being pending after the report
http://bugzilla.scilab.org/4276
it was fixed very recently and is already available in the
Nightly Built 6.0 branch:
https://codereview.scilab.org/#/c/19144/

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


Re: [Scilab-users] how to place datatip on one point of polyline

2017-03-27 Thread sgougeon
>De: "Erhy", Lundi 27 Mars 2017 11:59:49
>Objet: [Scilab-users] how to place datatip on one point of polyline
>
>Hello!
>If I plot curves where some values are %nan
>datatips are not shown if the curve point for the tip is surrounded by %nan 
>values.
>Now I code on Version 6.0.0

IMO, this current behavior is normal when the interpolation mode is "on",
what is the case in your examples.
However, when the interpolation mode is "off", each mark that is plotted
should indeed accept a visible datatip, while it is currently not the case:

Let's have the following vector of x or/and y values/nodes:
A  B  C %nan D %nan  E  F

a) A datatip set in C is not displayed => bug
b) But A datatip set in E is displayed: OK
c) A datatip set in D is not displayed = a) case

The bug is not yet reported:
In .interp_mode="off", each %nan cancels the display of a datatip set on the 
_previous_ valid node.

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


Re: [Scilab-users] how to add IPCV help

2017-04-25 Thread sgougeon
Hello,
When the module is loaded, its help pages are loaded as well. But then, if the 
help browser was already opened before loading IPCV, it must be closed and 
restarted to see IPCV pages.
HTH
Samuel 

- Mail original -
Hello,
 want to try IPCV in SciLab 6.0
Don't find a way to include IPCV specific help entries.

Thank you for advice
Erhy 
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Weird behaviour of two input() in a row

2017-04-26 Thread sgougeon
Hello,

>Hello all,
>
>I'm experiencing some weirdies with the following script (6.0.0, Windows 7) :
>
>// **
>
>A=input("A = ");
>
>B=input("B = ");
>
>// **
>
>When I run the script, I can enter the value for A then I get the --> prompt.
>It seems the script stopped, but if I press the "return" keyboard key, 
>The script seem to resume and ask for B, but I then have to press twice the 
>return key to validate it.
>
>Does anyone else get the same behaviour ?
>
>Shall I declare a bug?

No. It is already reported 3 times (at least), and already fixed (once, it is 
enough :) in the 6.0 NB branch.

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


Re: [Scilab-users] ?= =?utf-8?q? stripchart?

2017-04-26 Thread sgougeon
- Mail original -
Objet: Re: [Scilab-users]   ?==?utf-8?q? ?==?utf-8?q? stripchart?

>//dummy loop to simulate data generation and plotting
>for i=1:1000
>oldxy=e.children.data;//old data
>
>newy=rand();//this would be your recently measured Y
>newx=oldxy($,1)+1;//this would be your recently measured X
>newxy=[oldxy(2:$,:);[newx,newy]];
>e.children.data=newxy;//update data

You can replace all the following

>xmin=min(newxy(:,1));
>xmax=max(newxy(:,1));
>ymin=min(newxy(:,2));
>ymax=max(newxy(:,2));
>e.parent.data_bounds= [xmin,ymin; xmax,ymax];//rescale plot

with only

 replot // or: replot tight

>sleep(50)//wait a bit for a slow scroll
>end

and that's it

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


Re: [Scilab-users] Clear, export only an axis

2017-05-03 Thread sgougeon
Hello,

>Is it possible, when many axes (plot2d or polarplot) are docked into a unique 
>figure,

You mean: when using subplot()? Then, we do not properly speak about "docking".
Figures that are really docked together or to the desktop remain separated.

>to export the PNG of an axis like with the xs2png() function
>and a figure, without exporting the whole figure?

AFAIK, it is not possible. Exports apply only to whole figures.
But you may copy() an axes alone into a new figure, and then export this one.


>Also, is it possible to clear only one axis which is contained into a figure
>without clearing the whole figure?
Yes, with
delete(handle_of_the_axes)

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


Re: [Scilab-users] automatic traverse question

2017-05-09 Thread sgougeon
Hello Erhy,

>resu(:,:)=abs(imdbl(:,:,1)-imdbl(:,:,2))*max(imdbl(:,:,1),imdbl(:,:,2));

This syntax of max() works element-wise and returns a matrix.
Then, if the matrix is not square, the * multiplication can't work here.
So, depending of what you want to do, you shall either use .* instead of *,
or fix the way you use max().

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


Re: [Scilab-users] applying a function to each element

2017-05-10 Thread sgougeon
Hello Frieder,

max(A,B) does it:
--> max(A,B)
 ans  =
   3.
   3.
   2.

Samuel

- Mail original -

Hello, 

I have to matrices: A = [ 1 ; 2 ; 2 ] B = [ 3 ; 3 ; 1 ] 

I looking for get matric with having only the larger Elemtns: 

C = [ 3 ; 3 ; 2 ] 
Is there function to make to apply functions to eacth element. 

C = [ if A .> B then A else B] elemtwise. 

A for loop is to slow. 

Thanks a lot. 

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


Re: [Scilab-users] Problems with figures in Scilab 6.0.0

2017-05-10 Thread sgougeon
Hello Philippe,

Could you provide compared parts of screenshots from 5.5.2 and from 6.0.0 
illustrating it at the same resolution?
(whole heavy screenshots are not necessarily required)
Thanks

Samuel

- Mail original -
Hi,

My name is Philippe, I work in the field of physics and signal processing, I 
use scilab a lot in my work and I want to thanks very much all the the people 
involve in the development of this great software. 

  I updated my scilab to 6.0.0 two weeks ago on my power book (retina) running 
macOS 10.12.4. Since this time I experiment two problems with graphic figures. 
The first issue is that the thickness of the lines is really small and the text 
for the axis labels, curves label and title are almost unreadable (way smaller 
than in the preceding version). The second problem is about the zoom, when I 
try to zoom on a graphic figure using the rectangular selection with the mouse, 
I get an offset between the mouse pointer and the actual selection, making it 
impossible to correctly define de rectangular region. 

Is anybody else experimenting the same issues ? Does somebody have a fix or a 
workaround for that ?

Philippe.
___
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] automatic traverse question

2017-05-11 Thread sgougeon
>another question
>
>gray=rand(200,300);
>lumimins=[ 0.1, 0.5, 0.7, 0.9 ];
>// doesn't work*:*
>monos(:,:,1..length(lumimins)) = ( gray(:,:) >= lumimins(1:$) ) .* 1;
>
>is there a way to generate a plane for each lumimins with automatic traverse?


gray = rand(200,300);
lumimins = [ 0.1, 0.5, 0.7, 0.9 ];
Gray = gray .*. ones(1,1,length(lumimins));
L = ones(gray) .*. permute(lumimins,[1 3 2]);
monos = (Gray >= L) * 1;
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users



Re: [Scilab-users] automatic traverse question

2017-05-12 Thread sgougeon
Hello Erhy,

>I studied your solution and think there will be a very huge array with
>kronecker operator and  generated the planes with a for loop.

There is a common compromise between the used amount of memory and the 
algorithmic speed.
There we are.

>And now I have the problem with the max() function for all planes,
>at which in the resulting plane each pixel should have the max. values  of
>the according pixels of the planes mentioned.
>
>max() works of a known number of planes:
>resu=max(monos (:,:,1),monos (:,:,2),monos (:,:,3))
>
>What is the smartest way to code, if the number of planes can differ?

I am afraid that i don't clearly catch your point.
If what i guess is not too far from what you mean, here is a way:

MAX = monos(:,:,1);
for i = 2:N
   MAX = max(MAX, monos(:,:,i))
end

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


Re: [Scilab-users] Closing popup windwos

2017-06-01 Thread sgougeon
Hello,

>Hi every body,
>
>I would like to know if there exist a function to close dialog windows 
>(like messagebox, progressionbar, waitbar...), as 'xdel' does for 
>regular graphic window(s).

winH = waitbar(37,"Can it be closed before completion?");
close(winH);

id = progressionbar("Work in progress...");
close(id);

messagebox(): AFAIK, it's only interactive: http://bugzilla.scilab.org/7157

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


Re: [Scilab-users] Element Wise multipliication in Scilab

2017-06-08 Thread sgougeon
Hello,

>- Mail original -
>
> During Image Processing, I have an extracted small matrix 
>
> Mat = 
>
>  152  149  151  
>  159  151  147  
>  158  152  152  
>
> and a simple flipped sobel mask 
>
> Gy  =
> 
>  - 1.  - 2.  - 1.  
>0.0.0.  
>1.2.1.  
>
> To calculate the gradient in y-direction, I multiply elementwise (and would
> sum later if the values were right)
>
> Gy.*Mat, which funnily gives
>
>  104  214  105  
>000  
>  158   48  152  
>
> Why aren't the first row values negative (They even appear morphed somehow).
>

Because 
a) numbers in Mat are encoded as unsigned integers (they are displayed without 
decimal dot),
+
b)in Scilab, integers win over floats.
+
c) in Scilab, overflowing integers are wrapped, not ceiled nor floored.

You will get want you likely expect with 
Gy .* double(Mat)

>Scilab help shows that .* may calculate the kronecker product of the two
>matrices. 

Could you give us a pointer where this is written?
The kronecker operator is .*.

>How do I calculate the real element wise multiplication?

With .*, after casting Mat to decimal encoding.

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


Re: [Scilab-users] Convert struct to mlist/tlist

2017-07-12 Thread sgougeon
Hello Shamikan,

A (array of) structures IS a mlist. The list of defined fields is returned by 
fieldnames():

--> s.b = %t;
--> s.r = %pi;
--> s.p = %z
 s  = 
  b: [1x1 boolean]
  r: [1x1 constant]
  p: [1x1 polynomial]


--> fieldnames(s)
 ans  =
!b  !
!   !
!r  !
!   !
!p  !

And the number of fields:
--> size(fieldnames(s),1)
 ans  =
   3.

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


Re: [Scilab-users] Digit Grouping in msprintf?

2017-11-06 Thread sgougeon
Hi Richard,

Are you sure that a relative accuracy of 5e-8 of your result is 
relevant/actual/significant?!
(.f displays 6 decimal digits after the dot).
If yes, and if 
msprintf('%5.2f GWh',2725977/1e6)
does not match your actual data and relative accuracy, AFAIK there is no way 
with the Scilab C format to group digits.

So, you may post-process the resulting string with some strsplit(s,..) and 
strcat(s, " ") calls.
Tuning the space's width is mainly/only possible with a LaTeX rendering on 
graphics.

HTH
Samuel

- Mail original -
De: "Richard llom" 
À: users@lists.scilab.org
Envoyé: Jeudi 2 Novembre 2017 15:48:49
Objet: [Scilab-users] Digit Grouping in msprintf?

Hey,
is it possible to have this
msprintf('%.f kWh',2725977)
output something like "2.725.977 kWh" or even better "2 725 977 kWh" (with
thin spaces)?

Thanks
richard



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


Re: [Scilab-users] surf and %nan

2017-11-21 Thread sgougeon
Hello Richard,

>- Mail original -
>Envoyé: Mardi 21 Novembre 2017 17:41:40
>
>Hi all,
>I have a big matrix, which I want to surf plot. However there are actually
>only values for a non-rectangular shape and i want to blank out those other
>values (which are -999 by default).
>
>[a,b]=find(M==-999);
>M(a,b) = %nan;

The syntax is:
M(M==-999) = %nan;
or
M(find(M==-999)) = %nan;

Then

surf(M);

should be OK.

HTH
Samuel

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


Re: [Scilab-users] surf and %nan

2017-11-21 Thread sgougeon
>It is not the most compact form but I think there is no issue with original 
>syntax proposed:
>[a,b]=find(M==-999);
>M(a,b) = %nan;

In the M(a,b) syntax, a stands for the indices of selected ROWS, and b for the 
vector of selected COLUMNS, no matter about the fact that a and b have here the 
same length and then could be -- erroneously -- considered as respective 
elementwise indices.
This is why linearized indices must be used, as returned by i = find(..).

--> m = int8(grand(5,5,"uin",0,9))
 m  = 
  2  1  5  0  9
  2  9  5  9  9
  4  5  0  4  3
  5  8  6  7  9
  4  3  9  6  6


--> m([2 3 5],[1 2 4])
 ans  =
  2  9  9
  4  5  4
  4  3  6


--> m([2 3 5]',[1 2 4]')
 ans  =
  2  9  9
  4  5  4
  4  3  6

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


Re: [Scilab-users] datatips and grayplot

2017-11-27 Thread sgougeon
Hello Richard,

>Still, kind of 'meh'. Because this way I cannot access the z-value...

You may use param3d() to plot a fake 3D polyline to support and "overlay" 
datatips.
Then the datatip will include Z by default.
If you are running 6.0: you may also try to use the new .display_components 
datatip field
https://help.scilab.org/docs/6.0.0/en_US/datatip_properties.html
Never tried Z whether gca().view=="2d". 

>Is there a way to align the text in the box (instead of centered)?

AFAIRemember, it used to be possible with the former datatip implementation up 
to 5.3 (or 5.4?).
But this feature has disappeared, as still a bunch of other graphic features, 
since 5.4.
Indeed, this compulsory centering is rather boring, to say few.

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


Re: [Scilab-users] numderivative Heart function

2017-11-30 Thread sgougeon
Hello Hermes,

- Mail original -
>.../...
>function m=g(x1,x2)
>  
> m=[2*x1-(x1.*(1.25*x2-sqrt(abs(x1/abs(x1).^(3/2),2.5*(1.25*x2-sqrt(abs(x1)))];

.. or ./abs(x1)  // instead?

>.../...
>I receive the following alert:
>  "Function not defined for given argument type (s), check arguments or
>define function% function_abs for overloading."
>
>should I define the function mabs = sqrt (x1 ^ 2 + x2 ^ 2);
>
>And using only the function g in contour2d (x, 2 * x ', g, [0 0]) I also
>receive the following alert:
>---> in builtin contour2d (C: \ PROGRA ~ 1 \ SCILAB ~ 1.0 \ modules \
>graphics \ macros \ contour2d.sci line 12)
>at line 33 of executed file C: \ Users \ hermesr \ Documents \ Scilab Xcos \
>FORUMs \ Heart and numderivative2.sce
>
>g: Wrong size for output argument # 1: A Scalar expected.

I also get with 6.0.0+:
--> contour2d(x, 2*x', g, [0 0]);
in builtincontour2d ( SCI\modules\graphics\macros\contour2d.sci 
line 12 )

g: Wrong size for output argument #1: A Scalar expected.
敦慶l: An error occured in '硥捥敆慶䙬' subroutine.


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


Re: [Scilab-users] Scrollbar in figures

2017-12-21 Thread sgougeon
Hello Baptiste, Antoine,

I have used exactly the code and protocole posted by Antoine afterwards.
Are you using Scilab on Linux, like Antoine? In this case, it is clearly a bug 
specific on Linux.

There are other bugs around .auto_resize (and .viewport), brought by Scilab 
5.4.0 and still unfixed:
http://bugzilla.scilab.org/14650
http://bugzilla.scilab.org/14693

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


Re: [Scilab-users] Scrollbar in figures

2017-12-21 Thread sgougeon
Aa, i get it as well!

Actually, it works as i reported it only for the first run from a fresh Scilab 
session.
Then, forthcoming tests with exactly the same code and in a fresh figure shows 
the bug as you report it...

Samuel

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


Re: [Scilab-users] Scrollbar in figures

2017-12-21 Thread sgougeon
>Yes that's it. Got it to work once. Are you filing the bug report Samuel or
>do you need me to do it?

Yes please, i let you doing it, as you reported it here.
Thanks
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Dump the output of a function

2018-01-16 Thread sgougeon
Hello Clément,

OK for your confirmation. Unfortunately, in Scilab "_" can't be used, because 
_() is a defined function aliasing gettext(), and Scilab needs it as is.

I don't think it was a good thing to use a single character to define such an 
alias, but it is as is.
It would be unlikely possible to rename it... Would it?

Best regards
Samuel

- Mail original -
De: "Clément David"
À: users@lists.scilab.org
Envoyé: Mardi 16 Janvier 2018 09:31:20
Objet: Re: [Scilab-users] Dump the output of a function

Hello Christian, Samuel,

My 2c, most of the modern languages supporting such a feature are using the 
one-character variable
trick; sometimes enforced by conventions. For example, Go, Rust and Python are 
using `_` as in :

[_,_,kb] = intersect(grand(1,10,"uin",0,9), grand(1,10,"uin",0,9));

This character appears as a visual blank thus the function call is easily 
readable.

Regards,

--
Clément
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] macOs High Sierra

2018-02-05 Thread sgougeon
Hello,

You may try there: https://build.scilab.org/job/scilab-6.0-macosx/

Regards
Samuel Gougeon

- Mail original -
De: "Philippe Dérogis" 
À: "Users mailing list for Scilab" 
Envoyé: Lundi 5 Février 2018 12:44:06
Objet: [Scilab-users] macOs High Sierra

Hi, 

I upgraded my mac to High Sierra 10.13.3 last week and Scilab 6.0.0 doesn’t 
start anymore. I tried to download the nighty build here : 
http://www.scilab.org/en/development/nightly_builds/branch60 and I get the 404 
error : The requested URL 
/download/2017-08-02/scilab-branch-6.0-1500821730-x86_64.dmg was not found on 
this server. 
I would like to know if there is a fix to this situation. 

Any help would be greatly appreciated. 

Thanks to all developers and contributors. 

Philippe DEROGIS. 

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


Re: [Scilab-users] circshift() : Scilab Enhancement Proposal

2018-06-07 Thread sgougeon
>Samuel, 
>
>The idea and the implementation of the end-points interpolation is that
>this is done on the input data (big slope), not on the FFT output.

This is clear

>Maybe be it needs some further work. Tbc. 

I don't think so.

>Noting also that between the endpoints of the DFT periodic input, there is the 
>interval of one sample.

That is to say: Let u(1:$) be the original signal.
Since it is virtually periodic, the FFT sees u($+1)=u(1).
Do we agree about this?

Then: Do we agree on that the |slope| across the shifted edges
of u is necessarily greater or equal to |u($)-u(1)|/1 ?
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Remove duplicate rows and sustain original order of rows

2018-06-13 Thread sgougeon
Hello,

- Mail original -
De: "CHEZE David 227480"
À: "Users mailing list for Scilab" 

>Hi Iza,
>
>Just consider this tip from the unique help page:
>
>Extracted components, rows or columns can be resorted in their initial order 
>by sorting k:
>[N, k] = unique(M);  k = gsort(k,"g",i); N = N(k)
>[N, k] = unique(M, "c"); k = gsort(k,"g",i); N = N(:, k)
>[N, k] = unique(M, "r"); k = gsort(k,"g",i); N = N(k, :)

I recently added this tip (in 6.0.1 doc), but it is wrong.
This mistake is already fixed for SCilab 6.0.2 @ 
https://codereview.scilab.org/#/c/19944/3/scilab/modules/elementary_functions/help/en_US/setoperations/unique.xml

Example:
M = int8([2  0  2  2  1  1  1  2  1  1  0  1  1  0  1  1
  0  1  2  0  1  2  2  0  1  1  2  0  1  0  0  0
  ])
[uc, kc] = unique(M, "c")

// Get unduplicated columns in initial order:
M(:, gsort(kc,"g","i"))

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


[Scilab-users] Re : concatenate hypermatrices along the 3rd dimension

2018-10-08 Thread sgougeon
Hello Antoine,

Please check cat(3, ..) to concatenate along the 3rd (or any) dimension.
Please check resize_matrix() to padd an hypermatrix (with what you want).

Regards
Samuel

- Mail d'origine -
De: antoine monmayrant 
À: International users mailing list for Scilab. 
Envoyé: Mon, 08 Oct 2018 14:13:37 +0200 (CEST)
Objet: [Scilab-users] concatenate hypermatrices along the 3rd dimension

Hi all,

I'm trying to stack (or concatenate) 3D matrices (hypermatrices) along 
the 3rd dimension.
(The goal is to perform zero-padding along the 3rd dimension).
So far, the only - and ugly - solution I've found is the following:

//my padding
a=zeros(2,2,3);
//my data
b=a;
b(:,:,1)=[111,112;121,122];
b(:,:,2)=[211,212;221,222];
b(:,:,3)=[311,312;321,322];
// zero-padded data
padded_b=matrix([a(:);b(:);a(:)],[size(a,1),size(a,2),3*size(a,3)]);
Is there a solution that is less convoluted (and maybe more efficient) 
than resorting to this mix of "(:)" and "matrix"?
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] Re : fftshift and ifftshift are way too different

2018-10-09 Thread sgougeon
Hello Antoine,

fttshift() switches all halves along all dimensions. This is mandatory.
So for instance in 2D, opposite quadrants (wrt the center) are switched.
In 3D, opposite cubes are switched. etc.

To me, the current implementation is right:

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

--> fftshift(m)
 ans  =
   5.   9.   4.   1.   8.
   3.   0.   2.   5.   9.
   5.   6.   2.   4.   5.

--> ifftshift(fftshift(m))
 ans  =
   2.   5.   9.   3.   0.
   2.   4.   5.   5.   6.
   4.   1.   8.   5.   9.

--> and(ifftshift(fftshift(m))==m)
 ans  =
  T

BR
Samuel

- Mail d'origine -
De: antoine monmayrant+scilab 
À: International users mailing list for Scilab. , List 
dedicated to development questions 
Envoyé: Tue, 09 Oct 2018 11:02:20 +0200 (CEST)
Objet: [Scilab-users] fftshift and ifftshift are way too different

Hello all,

 From what I understand of fast Fourier transforms, fftshift and 
ifftshift should be almost identical.
The only difference is when there are an odd number of elements in the 
dimension along which the shift is performed (ie 
fftshift([1:4])==ifftshift([1:4]) but fftshift([1:5])!=ifftshift([1:5])).
However, it seems that in scilab6.x fftshift and ifftshift are based on 
completely different codes and do not accept the same arguments.
In particular, with fftshift, one can specify the dimension along which 
to perform the shift, while it is not the case for ifftshift.
I think some update of ifftshift would be welcome.
I propose to use the code below (myifftshift), where I just changed 
"ceil" by "floor" in the definition if fftshift.
What do you think, does it look right to you?

Cheers,

Antoine

function x = myifftshift(x,job)
 if argn(2)<2 then job="all",end
 deff("sel=fun(sk)","c=floor(sk/2);sel=[c+1:sk,1:c]")
 if job=="r" then job=1,elseif job=="c" then job=2,end
 ind=list()
 if job=="all" then
 for sk=size(x),ind($+1)=fun(sk),end
 else
 for sk=size(x),ind($+1)=:,end;
 ind(job)=fun(size(x,job))
 end
 x=x(ind(:))
endfunction
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] Re : Re: grand in 6.0.1

2018-10-12 Thread sgougeon
It is already reported: http://bugzilla.scilab.org/15524

- Mail d'origine -
De: amonm...@laas.fr
À: users@lists.scilab.org
Envoyé: Fri, 12 Oct 2018 09:39:11 +0200 (CEST)
Objet: Re: [Scilab-users] grand in 6.0.1

Hello again,

I just tried grand(10,1,"nor",0,1) on a fresh install of 6.0.1 on Ubuntu 
18.04 and I can reproduce your bug.
Can you fill a bug report on bugzilla?

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


[Scilab-users] Re : plot3d and param3d

2018-11-06 Thread sgougeon
Hello Paul,

Your polyline is directly e2, not any child p2.

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


[Scilab-users] Re : Re: display of complex/not real numbers, again

2019-09-18 Thread sgougeon
Le 18/09/2019 à 13:50, Stéphane Mottelet a écrit :
>
>> Another regression very close to this one, but with real numbers 
>> display, would deserve the same care :
>> Scilab 5:
>> -->[1e30 1e-30]
>>  ans  =
>>     1.000D+30    1.000D-30
>>
>> Scilab 6:
>> --> [1e30 1e-30]
>>  ans  =
>>    1.000D+30   0.
> The patch also fixes this.
>>
>> So, very small numbers are reduced to strict 0...
>
>Samuel,  do you know if a bug was reported for this particular point ?
>Thanks,
>S.

Somewhat here: http://bugzilla.scilab.org/14746
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] Re : Problems with mfile2sci

2019-10-07 Thread sgougeon
Hello Federico,

With some end indices in your script, you are certainly facing the bug 
http://bugzilla.scilab.org/16181
This bug prevents starting the actual conversion.
You may copy the proposed fix on your own Scilab installation, and use it.

Regards
Samuel

- Mail d'origine -
Dear all,

I'm trying to convert a script originally written in Matlab and saved as
an .m file to Scilab using the function mfile2sci. However, I don't get
any .sci file. I get a .cat file which contains mostly the comments
without the comment sign //. I get also a .log file with a brief job
summary, indicating that no conversion was performed since "file
contains no instruction", which is not the case. I'm attaching the
original m file and the .cat and .log files.

Am I doing anything wrong?

I've tried to change the options (recursive mode, etc.)with no success.

I'm using 6.0.2.

Regards,

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


[Scilab-users] Re : How to identify componants in a figure ?

2019-10-11 Thread sgougeon
Hello Pierre,

Just do find(a.type=="Axes")

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


[Scilab-users] Re : Stopping at the line generating warning

2019-12-02 Thread sgougeon
Hello,

Yes, with
--> warning stop

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


[Scilab-users] Re : problem with matrix of polynomials

2020-03-09 Thread sgougeon
Hello Federico,

cond() and rcond() do not accept rationals, but the determinant of A is very 
close to 0:
--> det(A)
 ans  =
 
  3.573D-10  
     
   0.027s² +7.433D-10s³  

This likely explains that the inversion is not reliable.

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


[Scilab-users] Re : calendar does not work

2020-08-25 Thread sgougeon
Hello Heinz,

You are likely using a quite restricted font for the Scilab console.
May be your system's one as the default.
These characters are non-breakable spaces ascii(160) <=> ascii([194 160]),
that are not US-ASCII but nevertheless rather standard.
You can check in your Scilab preferences, in the Fonts section:
With the font chooser, check "Monospaced" checkbox to list only monospaced
fonts. This is mandatory to keep matrices aligned, etc.
Then, the "Monospaced" or "Consolas" fonts are good choices.
They should include all latin-like fonts, and many non-latin ones
like cyrillic, arabic, japanese, etc. And of course the non-breakable spaces.

The support of extended UTF-8 characters has been added in Scilab 6.1.0
for the Scilab Advanced console (NW) and Raw console (NWNI) modes.
Documenting it with adding a  "Font How-to" section to the --> help console page
is on the TODO list, for all STD NW and NWNI Scilab modes ;-)

Every feedback is welcome about this char(160) case, noticeably from users
using non-latin fonts.
ascii(160) have been substituted to ascii(32) in calendar() in order to prevent
lines wrapping for the calendar block of lines. But the "risk" to have a so
narrow console is quite low, and we can keep normal spaces if it looks
at last preferable.

Regards
Samuel

- Mail d'origine -
De: Heinz Nabielek 
À: Users mailing list for Scilab 
Envoyé: Wed, 19 Aug 2020 00:10:23 +0200 (CEST)
Objet: [Scilab-users] calendar does not work

--> calendar
 
 AugÂ2020
 MonÂÂTueÂÂWedÂÂThuÂÂFriÂÂSatÂÂSun
 ÂÂ12
 Â3456789
 10ÂÂÂ11ÂÂÂ12ÂÂÂ13ÂÂÂ14ÂÂÂ15ÂÂÂ16
 17ÂÂÂ18ÂÂÂ19ÂÂÂ20ÂÂÂ21ÂÂÂ22ÂÂÂ23
 24ÂÂÂ25ÂÂÂ26ÂÂÂ27ÂÂÂ28ÂÂÂ29ÂÂÂ30
 31ÂÂ

What had happened? Scilab 6.1 under macOS Catalina 10.15.6

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

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


[Scilab-users] Re : Re: calendar does not work

2020-08-25 Thread sgougeon
>Who do I change to en_US.UTF-8 permanently under zsh? All my attempts change 
>it only momentarily

As suggested in my previous post, changing your defaults should not be 
necessary.
Just using Scilab preferences, out of defaults, should fix the issue.
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] Re : restriction for fileinfo (?)

2021-09-28 Thread sgougeon
Philipp,

No problem for me with Scilab 6.1.1 on Windows 10 for a file in a directory 
whose name is 272-character long, when calling fileinfo() with the huge name in 
the path.
So the issue may come from elsewhere. May be from a symbolic link (no test done 
on my side)?

Samuel

- Mail d'origine -
De: P M 
À: International users mailing list for Scilab. 
Envoyé: Tue, 28 Sep 2021 11:13:30 +0200 (CEST)
Objet: [Scilab-users] restriction for fileinfo (?)

Dear,

is there a restriction in path length when using fileinfo() ?
I find files paths with a total length of > 256 characters.

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


[Scilab-users] Re : Cauchy Integral query

2022-01-05 Thread sgougeon
Hello Lester,

The integrand is y = exp((z^2))/(z-2), not y = exp((z^2)).
Then, provided that the (undocumented) absolute tolerance is increased wrt the 
default one,
we get the expected result:

--> function y=f(z)
  >   y = exp((z.^2))./(z-2)
  > endfunction

--> fz=intl(0, 2*%pi, 2, 1, f,1e-10) // gives round-off error
 fz  = 
   4.199D-13 + 343.05029i

--> 2*%pi*%i*%e^4
 ans  =
   0. + 343.05029i

Regards
Samuel

> - Mail d'origine -
> De: Lester Anderson
> Envoyé: Wed, 05 Jan 2022 09:46:47 +0100 (CET)
>
> Hello,
>
> I am trying to understand how to work the Cauchy integral inputs and
> replicate the results of a published example:
>
> .e.g. Compute the integral of e^(z^2) / (z-2) assumes C is closed
> (anticlockwise) and z=2 is inside C (a simple circle). The solution should
> be 2*pi*i*f(2) = 2*pi*i*e^4
>
> In Scilab, the solution is defined from the Cauchy Integral (intl):
> y = intl(a, b, z0, r, f)
> a and b are real and z complex
>
> function y=f(z)
>   y = exp((z^2)) // solution uses f(z) =  e^(z^2)
> endfunction
>
> fz=intl(0, 2*%pi, 2+0*%i, 1, f) // gives round-off error
> // z position +2(real z), 0(imaginary z)
>
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users