Prev: rounding particle value using PSO
Next: Contourf
From: Oleg Komarov on 22 Mar 2010 16:30 "Jan Sieber" <jan.sieber(a)port.ac.uk> wrote in message <ho8gc5$bsd$1(a)fred.mathworks.com>... > This defeats the purpose of being able to do arbitrarily large integers: what about > MyAdd(ones(1,40000)*9,ones(1,39999)*7)? > (That is 999...999+77...777.) That's right. > The idea was that one cannot do it without loop, and that the students have to construct the loop themselves. So, your solution would not help. I'd suggest to let the students come up with the solutions themselves, and not doing their homework for them. It really does not help them in the long run: the problem here is not Matlab but the basic ability to express a known algorithm in a computer language. Totaly agree about the student thing, sorry if I didn't catch the message in your first post. Not totally sure about "The idea was that one cannot do it without loop" Regards Oleg |