Re: [Scilab-users] Sound acquisition with Scilab under Linux

2015-09-29 Thread Clément David
Hello,

To handle a cross-platform sound handling in Scilab I suggest you to
take a look at JIMS and the "Java Sound API". Not sure if it will fit
your needs but might be.

Note: another more advanced approach is to use SWIG-Scilab to generate
the mapping of a library (Gstreamer might be a good cross platform
candidate).

Regards,

--
Clément

Le lundi 28 septembre 2015 à 21:03 +0200, Antoine Monmayrant a écrit :
> Hi all,
> 
> Well, everything is in the title: how can I acquire sound in Scilab
> under Linux?
> The only package I've found so far is only working under Windows?
> 
> Cheers,
> 
> Antoine
> 
> ___
> 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] Function

2015-09-29 Thread Peter Q.
Hi.
I need your help.
Is there a function for distance between two points?
Thanks in advance.
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Function

2015-09-29 Thread Claus Futtrup

Hi Peter Q

This question is just the strangest question I have ever seen on the 
Scilab forum. I'm not sure whether I shall think this is spam? ... 
alternatively, consider reading a Calculus book from high school. 
Possibly come back with a more well-defined question.


Best regards,
Claus

On 29-09-2015 15:58, Peter Q. wrote:


Hi.
I need your help.
Is there a function for distance between two points?
Thanks in advance.



___
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] Function

2015-09-29 Thread jasper van baten

sqrt(sum((a-b).^2))

if your points are stored in vectors a and b.

Best wishes,

Jasper

On 9/29/2015 15:58, Peter Q. wrote:


Hi.
I need your help.
Is there a function for distance between two points?
Thanks in advance.



___
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] Function

2015-09-29 Thread Serge Steer
Le 29/09/2015 15:58, Peter Q. a écrit :
>
> Hi.
> I need your help.
> Is there a function for distance between two points?
>
If your points are given by cartesian coordinates stored in 2 arrays  p1
and p2
you can compute the distance between these 2 points with
norm(p2-p1)
or equivalently by
sqrt(sum(p2-p1).^2)
Serge Steer
>
> Thanks in advance.
>
>
>
> ___
> 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] Function

2015-09-29 Thread jasper van baten
I think you are missing brackets there, presuming .^ now operates on the 
sum?


Best wishes,

Jasper.

On 9/29/2015 16:20, Serge Steer wrote:

Le 29/09/2015 15:58, Peter Q. a écrit :


Hi.
I need your help.
Is there a function for distance between two points?

If your points are given by cartesian coordinates stored in 2 arrays  
p1 and p2

you can compute the distance between these 2 points with
norm(p2-p1)
or equivalently by
sqrt(sum(p2-p1).^2)
Serge Steer


Thanks in advance.



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




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


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


Re: [Scilab-users] Function

2015-09-29 Thread Peter Q.
Thanks guys for answer.
Two points on plane; norm and sqrt work.
On Sep 29, 2015 9:26 AM, "Claus Futtrup"  wrote:

> Hi Peter Q
>
> This question is just the strangest question I have ever seen on the
> Scilab forum. I'm not sure whether I shall think this is spam? ...
> alternatively, consider reading a Calculus book from high school. Possibly
> come back with a more well-defined question.
>
> Best regards,
> Claus
>
> On 29-09-2015 15:58, Peter Q. wrote:
>
> Hi.
> I need your help.
> Is there a function for distance between two points?
> Thanks in advance.
>
>
> ___
> 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


Re: [Scilab-users] Function

2015-09-29 Thread Samuel Gougeon

Hi,
Le 29/09/2015 15:58, Peter Q. a écrit :


Hi.
I need your help.
Is there a function for distance between two points?
Thanks in advance.


.
Sharing the thoughtful skepticism of Claus, i would say: If the points 
are lying on a sphere and you are looking for the shortest direct arc 
linking them along the sphere, the Wikipedia page about spherical 
trigonometry might help you: 
https://en.wikipedia.org/wiki/Spherical_trigonometry
Then, the usual cos(), and sin() Scilab functions will allow you 
implementing the relevant spherical formula.

;)
Samuel Gougeon

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


[Scilab-users] Strange behaviour with for loops

2015-09-29 Thread Pierre Vuillemin

Hello,

In the help, it is specified that the syntax 'for e = l ...' when l is a 
list is authorised. When l is replaced by a vector, the result appears 
to depend on whether its a column or row vector :


With this code, the for loops runs 3 times and each time i is equal to 
another value of the vector idx


idx =[1 2 3];
for i = idx
disp("newIter")
disp(i)
end

When the vector idx is a column vector now, there is only one loop and i 
is equal to the vector idx


idx = [1 2 3]';
for i = idx
disp("newIter")
disp(i)
end

Is this behaviour intended?


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