From: David Young on
"Soumya " <soumya.nsec(a)gmail.com> wrote in message <husom0$9nm$1(a)fred.mathworks.com>...
> "David Young" <d.s.young.notthisbit(a)sussex.ac.uk> wrote in message <huso1c$rdb$1(a)fred.mathworks.com>...
> > Can you say a little more exactly what you mean by a banana-shaped dataset?
>
....
>
> http://nichol.as/papers/labreport3.pdf
>
> Thanks for helping out.. see the pdf..in the 3rd page there is a picture of banana distribution.. I think this will clarify the issue. I need a dataset of those patterns in the distribution..

I've had a look at the code you posted and the picture of the distribution.

There are two problems with the code. The first is that it is copyright - I don't know if you had permission to post it here, but you didn't then you perhaps should have asked before doing so. (I'm not sure about the rules, so if someone wants to correct me, feel free!)

The other is that it appears to be one function out of a suite of functions that are designed to work together. It can't be run on its own. Do you have access to the other functions (ptrace, genclass etc.)? If so, put the directory containing them on your Matlab path and you should be able to call this one. If you don't have the others, then the simplest solution may be to contact the Delft group and ask them for help directly.

Finally, the function you have does provide a working definition of "banana-shaped". The line starting "domaina = " and the following line starting "a = " are in fact all that is needed to generate one set of banana-points, so you could base your own code on these - just give N, s and r the values you want, and ignore all the calls to the other functions. (Though again, if you distribute modified code, you may be in breach of copyright, so I urge you to contact the authors.)
From: Walter Roberson on
David Young wrote:

> There are two problems with the code. The first is that it is copyright
> - I don't know if you had permission to post it here, but you didn't
> then you perhaps should have asked before doing so. (I'm not sure about
> the rules, so if someone wants to correct me, feel free!)

Copyright laws depend upon the country.

In the USA, posting moderate amounts of code for the purpose of research
would potentially be covered by "Fair Use" laws, but if the code posted
covered more than was required to ask the question then courts would
examine the urgency of the situation: unnecessary code together with a
non-urgent situation would possibly be ruled to exceed Fair Use.

In Canada, the laws are less well defined, but there is a distinct
clause permitting "personal research". That would not apply for work
done directly for hire or employment, but would _potentially_ apply to
academic work (or equivalent) for people who do not really distinguish
their work life from their home life.