Sunday, October 08, 2006

a question

Dear All
As Koorosh wanted us to share all the problems we faced, even unimportant problem, I wanna ask you a funny question.
In part 4 of our assignment, we were asked to reverse the results of first trial from 500 to 1 and put them in another array. I did it by using a loop , but I guessed that we could do it without loop. I tried different commands, but all of them were wrong. for example:
reversedFirstTrial(:,:)=spikes1(1,500:1);
Does any one know what's the problem? when I replace the red written part with "1:500" , there is no problem.
Yours

1 comment:

Ghoul said...

That's the point. You should not use any loop or even a m-file for the exersises. All of them can be done by only one command (at worst not more than one nested command). Keep trying.