Choosse randomly number of elements from a vector 1.0
File Size: 10.0 KB
Choosse randomly number of elements from a vector 1.0 Description
Description: function [out]=random2(ini,fin,num) % Choosse randomly a number (num) of elements from a vector [ini:fin] % Randomly change the position of the vector. in pairs of twos % % Imput: % ini: Beginning of the vector % fin: End of the vector % nun: Number of elements to choose from the range of vector [ini:fin] % % Output % output vector % % Example % % [out]=random2(-20,20,10) % % out = % -1 5 18 -3 1 -17 15 7 3 -6 % % [out]=random2(5,50,10) % % out = % 29 19 20 47 43 18 14 48 23 28
vr=ini:fin; % Reference Vector lon=fin-ini; % variation or range of the vector
for nv=1:5*length(vr) % vector length. p1=ceil(lon*rand); % randomly chooses position to move. p2=ceil(lon*rand); % randomly selects the position where it is going to move. tp=vr(p1); % temporal position. vr(p1)=vr(p2); % Change inicial by end position. vr(p2)=tp; % Change end by inicial position. end
This function is based on MyBlob toolbox, and it's used to create test environments starting from existing databases, copying a fixed number of elements from eache table of the source database to test one. I'm not related to...
Creates a number of samples from a specified number of dimensions and centers them around a given mean, and within a given covariance range. You might not find it very useful, but hey, I need something to do this so why not.
This plugin will allow you to show specific number of posts from a selective category. To use this plugin, you have to place a tag in the following format in your posts or pages: [pbc=CategoryID count=num_of_posts]
SilWeb is a phonological parser for returning prosodic and constitutive composition as stress acent, phonemic information and number of sillables from a phonological transcription of written words in Brazilian Portuguese.
Get the number of days in a month is a tutorial which helps the users how to obtain the number of days in a month with the help of ASP. This is a simple and more useful for the novice programmers how to obtain the number of days using ASP server...
All files and free downloads are copyright of their respective owners. We do not provide any hacked, cracked, illegal, pirated version of scripts, codes, components downloads. All files are downloaded from the publishers website, our file servers or download mirrors. Always Virus check files downloaded from the web specially zip, rar, exe, trial, full versions etc. Download links from rapidshare, depositfiles, megaupload etc not published.