[Scilab-users] contour : z level use

2017-04-01 Thread paul . carrico
Hi 

In the following example, I'm trying to add a single contour line equals
to z = 0, but I've another value: what am I doing wrong? 

Thanks for the help 

Nota bene : I'm under 5.5.2 Scilab release 

Paul 

##

mode(0)

X = linspace(0,1,10);
Y = linspace(0,1,10);
Z = rand(10,10) - rand(10,10);

Z_min = min(Z);
Z_max = max(Z);

//  plot3d

scf();
xset("colormap",jetcolormap(64)); 
drawlater() ;
xtitle("Z following (X,Y)");
colorbar(Z_min,Z_max); 
a=get("current_axes");
a.x_label; x_label=a.x_label; x_label.text=" X";
a.y_label; y_label=a.y_label; y_label.text=" Y";
a.z_label; z_label=a.z_label; z_label.text=" Z";
plot3d1(X,Y,Z,45,80);
contour(X,Y,Z,1,flag=[0 1 4],zlev=0.);
drawnow() ;___
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-01 Thread Nikolay Strelkov
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 :

> 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 :
>
>> 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 
> listusers@lists.scilab.orghttp://lists.scilab.org/mailman/listinfo/users
>
>
>
> ___
> users mailing list
> users@lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users
>
>
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] Setting compilers in Preferences: a good target for Scilab 6.1

2017-04-01 Thread Samuel Gougeon

Hello,

Le 31/03/2017 à 23:02, phillip mobley a écrit :

Hello everyone,

I seem to be running into an interesting issue with my xcos code, I am 
getting an error that it is unable to find a c compiler.


I am running win 10 and scilab 5.5.2

I have installed visual studio 2015. I am not too sure if it will pick 
up on this compiler. If not, I have downloaded the latest version of 
mingw and installed the dynamic linker for sci-lab and the program is 
still having issue with finding a compiler.


I was wondering if anyone here may have ran into a similar issue or if 
I could get some help in getting scilab to find a compatible compiler?


This most recent testimonial lengthens the already long list of similar 
posted issues.


The Scilab Preferences system is available since Scilab 5.4.0, so for 
almost 5 years.
It is somewhat hard to understand why compilers are not explicitly set 
in the Preferences,
instead of using a labyrinthine system of internal macros hard to 
maintain to /try/ to

detect installed compilers.

This wish for simplifying and making Scilab more reliable and simple to 
use with compilers

is reported @ http://bugzilla.scilab.org/12355

Implementing this in Preferences, and replacing calls to automatic 
detection with

Preferences settings in Scilab macros, could be a priority for Scilab 6.1

Best regards
Samuel Gougeon

___
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-01 Thread Tan Chin Luh

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 >:


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
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] Define numerator and denominator of transfer function as variables in Xcos (DLR block)

2017-04-01 Thread Nikolay Strelkov
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 :

> 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
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Setting up C-compiler

2017-04-01 Thread Nikolay Strelkov
Dear Phililip!

I do not know about MS compiler.
I use GCC from mingw on my Windows 8.1 laptop.

I installed version 0.9.3 from ATOMS
:
1. installed gcc x64 from -
http://atoms.scilab.org/toolboxes/mingw/0.9.3/files/gcc-4.6.3-64.exe
2. logged out
3. installed mingw toolbox in Scilab with
atomsInstall('mingw');
4. restarted Scilab
5. tested mingw toolbox with
atomsTest('mingw');

Hope this helps.

--

*With best regards,Ph.D., *


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

2017-04-01 0:02 GMT+03:00 phillip mobley :

> Hello everyone,
>
> I seem to be running into an interesting issue with my xcos code, I am
> getting an error that it is unable to find a c compiler.
>
> I am running win 10 and scilab 5.5.2
>
> I have installed visual studio 2015. I am not too sure if it will pick up
> on this compiler. If not, I have downloaded the latest version of mingw and
> installed the dynamic linker for sci-lab and the program is still having
> issue with finding a compiler.
>
> I was wondering if anyone here may have ran into a similar issue or if I
> could get some help in getting scilab to find a compatible compiler?
>
> ___
> 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