Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: a very time consumming code
Replies: 5   Last Post: Sep 28, 2013 4:33 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
draasoft

Posts: 12
Registered: 3/28/12
Re: a very time consumming code
Posted: Sep 27, 2013 7:06 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

dpb <none@non.net> wrote in message <l24f0q$adi$1@speranza.aioe.org>...
> On 9/27/2013 10:27 AM, Amer wrote:
>
>
> Since randi(s) returns a scalar and the result is only b that is passed
> modified by that one point , there's no point in computing any of the
> rest -- the function as written is the same as
>
> function [res] = binCross(a,b,cr)
> fx=randi(length(a));
> res(fx)=b(fx);
> end
>
> Now, this may not be what was/is intended; can't tell that--only what is
> actually coded.
>


Thank you so much for your response, but as you can see in the code, the vector res is first changed, then one point in the vector is put to the value of b in the same index to ensure that at least one point from be is taken.

In fact, the function computes the binomial cross over between vectors a and b.



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.