Re: [Scilab-users] How to open figure properties? BUGFIX PROPOSED

2017-04-03 Thread Viktor Mileikovskyi
I tried to investigate the problem. Running ged during the process of the 
dialog show cause including of the global variable ged_cur_fig_handle. It may 
contain the handle of the current figure. I stop the function and run 

handles = Get_handles_list(f) 
 handles  = 

37 by 1 matrix of handles: 
== 
Figure   
Axes 
Compound 
Polyline 
Label    
Label    
Label    
Label    
uimenu   
uimenu   
...  
uimenu 

"Label" is absent in select statement of ged.sci (lines 35...117). 

Possible reason of the error - the function " TK_send_handles_list" is not 
fully developed in LINUX version. 

For me the following bugfix works: 

file: /opt/scilab/share/scilab/modules/tclsci/macros/TK_send_handles_list.sci 
^ 
the following code is inserted after the line 113. It may be put inside the 
"select  hand.type" statement before any "case" word 

    case "Label"  //MY BUGFIX 
    iLab = iLab+1;  //I ASUME THAT iLab IS THE 
LABLE COUNTER. 
    //IF NOT, 
PLEASE REPLACE IT BY OTHER VARIABLE 
                                                                // AND 
INITIALIZE AT THE BEGINNING OF THE FUNCTION!!! 
    Labname= "Label("+string(iLab)+")"; 
    TCL_EvalStr("set "+SelObject+" "+Labname); 

3 квітня 2017, 17:06:32, від "Viktor Mileikovskyi" < v_...@ukr.net >: 

Can you open "Figure properties" dialog using the graphics windows menu? 

The additional tests are performed using the following OSes: 
- Windows (Windows 10 64 bit) - the "Figure properties" dialog is openned 
successfully; 
- Linux (Ubuntu 14.04 64 bit) - the "Figure properties" dialog can not be 
openned and the error below occurs. 

at line  116 of function TK_send_handles_list ( 
/opt/scilab/share/scilab/modules/tclsci/macros/TK_send_handles_list.sci рядок 
116 ) 
at line    99 of function ged  ( 
/opt/scilab/share/scilab/modules/graphics/macros/ged.sci рядок 110 ) 

Label not handled 

Therefore, the problem is related to LINUX 64BIT Version (maybe, also for 32 
bit). 
With best regards. 
Viktor. 

3 квітня 2017, 16:53:27, від "Heinz Nabielek" < heinznabie...@icloud.com >: 

What exactly is the problem? Everythings works for me as before-see
attachment. Heinz
< http://mailinglists.scilab.org/file/n4036134/Screenshot_2017-04-03_15.png > 



--
View this message in context: 
http://mailinglists.scilab.org/Scilab-users-How-to-open-figure-properties-tp4036131p4036134.html
 
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 
 
 

-- 
E-Mail: v_...@ukr.net 
E-Mail: mileikovs...@gmail.com 
Skype: mileikovskyi 
Mob: +38-044-2284247 
Mob: +38-094-8284247 

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

 
 

-- 
E-Mail: v_...@ukr.net 
E-Mail: mileikovs...@gmail.com 
Skype: mileikovskyi 
Mob: +38-044-2284247 
Mob: +38-094-8284247 

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


Re: [Scilab-users] How to open figure properties?

2017-04-03 Thread Viktor Mileikovskyi
Can you open "Figure properties" dialog using the graphics windows menu? 

The additional tests are performed using the following OSes: 
- Windows (Windows 10 64 bit) - the "Figure properties" dialog is openned 
successfully; 
- Linux (Ubuntu 14.04 64 bit) - the "Figure properties" dialog can not be 
openned and the error below occurs. 

at line  116 of function TK_send_handles_list ( 
/opt/scilab/share/scilab/modules/tclsci/macros/TK_send_handles_list.sci рядок 
116 ) 
at line    99 of function ged  ( 
/opt/scilab/share/scilab/modules/graphics/macros/ged.sci рядок 110 ) 

Label not handled 

Therefore, the problem is related to LINUX 64BIT Version (maybe, also for 32 
bit). 
With best regards. 
Viktor. 

3 квітня 2017, 16:53:27, від "Heinz Nabielek" < heinznabie...@icloud.com >: 

What exactly is the problem? Everythings works for me as before-see
attachment. Heinz
< http://mailinglists.scilab.org/file/n4036134/Screenshot_2017-04-03_15.png > 



--
View this message in context: 
http://mailinglists.scilab.org/Scilab-users-How-to-open-figure-properties-tp4036131p4036134.html
 
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 
 
 

-- 
E-Mail: v_...@ukr.net 
E-Mail: mileikovs...@gmail.com 
Skype: mileikovskyi 
Mob: +38-044-2284247 
Mob: +38-094-8284247 

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


Re: [Scilab-users] How to open figure properties?

2017-04-03 Thread Heinz Nabielek
What exactly is the problem? Everythings works for me as before-see
attachment. Heinz
 



--
View this message in context: 
http://mailinglists.scilab.org/Scilab-users-How-to-open-figure-properties-tp4036131p4036134.html
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


Re: [Scilab-users] Define numerator and denominator of transfer function as variables in Xcos (DLR block)

2017-04-03 Thread Nikolay Strelkov
Thank you, Oleksiy!

I added initial state vectors to the context:
IS1 = zeros(1,length(h1));
IS2 = zeros(1,length(h2));

Now It works as expected.

--

*With best regards,Ph.D., *


*associate professor at MPEI
,IEEE member,maintainer of
Mathieu functions toolbox for Scilab
,Nikolay Strelkov.*

2017-04-03 4:04 GMT+03:00 ol.bond :

> Hi,
>
> Another way to represent filter in Xcos is to use the Discrete State-Space
>  (DLSS) block. The matrices can be obtained directly from the
> syslin representation of the system:
>
> [A1 B1 C1 D1] = abcd(H1);
> [A2 B2 C2 D2] = abcd(H2);
>
> (This transformation can also be set in Xcos context)
>
> Yours
>
> 2017-04-02 23:45 GMT+09:00 Tan Chin Luh-2 [via Scilab / Xcos - Mailing
> Lists Archives] <[hidden email]
> >:
>
>> you're welcome.
>> anyway it should be a better way to construct the denominator, do let me
>> know if you find a better way. :)
>>
>> rgds,
>> CL
>>
>>
>>
>> On 2/4/2017 12:22 AM, Nikolay Strelkov wrote:
>>
>> Dear Tan Chin Luh!
>>
>> Thank you very much.
>> It works as expected!
>> The problem is solved.
>>
>> --
>>
>> *With best regards, Ph.D., *
>>
>>
>> *associate professor at MPEI ,
>> IEEE member, maintainer of Mathieu functions toolbox for Scilab
>> , Nikolay Strelkov.*
>>
>> 2017-04-01 17:23 GMT+03:00 Tan Chin Luh <[hidden email]
>> >:
>>
>>> Hi,
>>>
>>> If I understand correctly, you would like to create the filter in
>>> Scilab, and directly access from Xcos?
>>> if so, u could use the syslin object to do so.
>>>
>>> 1. Create the syslin obj
>>> h1 = wfir("lp",2,[.2 0],"re",[0 0])
>>> h2 = wfir("hp",3,[.1 0],"re",[0 0])
>>> num1 = poly(h1,'z','coeff')
>>> d = ones(1,size(h1,2)+1)
>>> d(1:$-1) = 0
>>> den1 = poly(d,'z','coeff')
>>> H1 = syslin('d',num1,den1)
>>> num2 = poly(h2,'z','coeff')
>>> d = ones(1,size(h2,2)+1)
>>> d(1:$-1) = 0
>>> den2 = poly(d,'z','coeff')
>>> H2 = syslin('d',num2,den2)
>>>
>>> 2. In Xcos
>>> use H1.num in the numerator block for LPF, H1.den in the denominator for
>>> the LPF, same for the HPF.
>>>
>>> Hope this helps.
>>>
>>> rgds,
>>> CL
>>>
>>>
>>> On 1/4/2017 9:53 PM, Nikolay Strelkov wrote:
>>>
>>> Anybody?
>>> Dear Tim, do you have any idea?
>>>
>>> --
>>>
>>> *With best regards, Ph.D., *
>>>
>>>
>>> *associate professor at MPEI
>>> , IEEE member, maintainer of
>>> Mathieu functions toolbox for Scilab
>>> , Nikolay Strelkov.*
>>>
>>> 2017-03-23 14:27 GMT+03:00 Nikolay Strelkov <[hidden email]
>>> >:
>>>
 Dear all!

 I'm playing with simple digital filtering in Xcos 5.5.2.
 I have two filters - low-pass and high-pass, connected in series.

 Xcos does not have convolution block.
 So I write FIR transfer function
 
 manually from impulse response function.
 I get impulse response functions from wfir function.

 Let's assume that we have two simple filters with impulse responses:
 h1 = [0.37419570.3741957]; // it's low-pass filter from h1 =
 wfir("lp",2,[.2 0],"re",[0 0])
 and
 h2 = [- 0.18709790.8  - 0.1870979]; // it's high-pass filter h2 =
 wfir("hp",3,[.1 0],"re",[0 0])

 I convert them to DLR
  SISOs and get:
 H1(z) = 0.3741957*z^-1 + 0.3741957*z^-2 = ( 0.3741957*z + 0.3741957 ) /
 (z^2);
 H2(z) = -0.1870979*z^-1 + 0.8*z^-2  - 0.1870979*z^-3 = ( -0.1870979*z^2
 + 0.8*z  - 0.1870979*z ) / (z^3);
 and place their numerator and denominator to the corresponding DLR
 blocks.
 Model is in attachment. It's an illustration, not real world example.

 I have a question. How I can automate the aforementioned process
 programmatically?
 I tried to create numerator and denominator with poly function and as
 strings, but Xcos does not support these types in DLR settings.

 --




 *With best regards, Ph.D., assistant professor at MPEI
 , IEEE member, maintainer of
 Mathieu functions toolbox for Scilab
 , Nikolay Strelkov.*

>>>
>>>
>>>
>>> ___
>>> users mailing list[hidden email] 
>>> http://lists.scilab.org/mailman/listinfo/users
>>>
>>> ___ users mailing list [hidden
>>> email] 
>>> http://lists.scilab.org/mailman/listinfo/users
>>
>> _

[Scilab-users] How to open figure properties?

2017-04-03 Thread Viktor Mileikovskyi
Hi! 

After upgrading to SciLab 6.0.0 there is a problem preventing easy final 
preparation of plottings for publications. It is impossible to open Figure 
properties window. 

-->  plot([1,2],[3,4]) 

--> //Now trying to open the "Figure properties" dialog using the menu of 
graphics window 
at line  116 of function TK_send_handles_list ( 
/opt/scilab/share/scilab/modules/tclsci/macros/TK_send_handles_list.sci рядок 
116 ) 
at line    99 of function ged  ( 
/opt/scilab/share/scilab/modules/graphics/macros/ged.sci рядок 110 ) 

Label not handled 

I file a bug 15102 https://bugzilla.scilab.org/show_bug.cgi?id=15102 but no 
activity. 

I know only one workaround - modifying the figure properties using console. It 
is very easy for automatic plotting preparation inside a macro but it throttles 
the manual preparation. 

With best regards. 
Viktor. 

-- 
E-Mail: v_...@ukr.net 
E-Mail: mileikovs...@gmail.com 
Skype: mileikovskyi 
Mob: +38-044-2284247 
Mob: +38-094-8284247 
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] simple plot function

2017-04-03 Thread Lamy Alain
You could use xstring or xnumb:

x=0:0.1:1;
y=exp((x.^4+x.^2-x+(5).^(0.5))/5)+sinh((x.^3+21*x+9)./(21*x+6))-3.0;
scf();
plot(x,y);

num = 1 : size(x, "*");

xnumb(x, y, num);
// or:
xstring(x, y, string(num));

// plus optionally:
a = gca();
a.data_bounds = [-0.1, -0.1; 1.1, 0.75];
a.tight_limits = "on";


Alain

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