I have a randomely produced integer value i that returns me an element A of a vector V with 12 elements (floating numbers).
decl i=round(rand()*11);
decl A=V;
How can I then "check" if the value A exists inside another vector K?
Any suggestions?
How to check if a singleton exists in a vector
-
- Regular
- Posts: 294
- Joined: 24 Jan 2012 18:22
Re: How to check if a singleton exists in a vector
Not sure if there is a dedicated function for this but i would just loop through it.
Re: How to check if a singleton exists in a vector
Hear ya! Thanks for the reply....I found a workaround to what I wanted to achieve so all is well.
Re: How to check if a singleton exists in a vector
Hi
Figured you would sort something out ..
This has come up before - there is stuff in SLVector that would help
Various ways tp approach it on whether you want just whether it there, or where it is etc
A==K should return array of 0,1 on whether there is match
so sumof(A==K)>0 will return 0/1 if it matches . . .
Cheers
MM
Figured you would sort something out ..
This has come up before - there is stuff in SLVector that would help
Various ways tp approach it on whether you want just whether it there, or where it is etc
A==K should return array of 0,1 on whether there is match
so sumof(A==K)>0 will return 0/1 if it matches . . .
Cheers
MM
iMac 2.8G i7 12G 10.6.8/10.7.2, Legacy Dexter/Lemur, Liine Lemur/iPad2, KMI SoftStep, 12Step & QuNeo , B-Controls, Mackie C4 etc
MaxMSP, Live Suite, Native Instrument stuff, etc Modified Virtual Guitar System etc All Projects/Modules © CC-BY-NC-SA[*][/b]
MaxMSP, Live Suite, Native Instrument stuff, etc Modified Virtual Guitar System etc All Projects/Modules © CC-BY-NC-SA[*][/b]