I built a GUI, and made a function named training. I load my databasetraining which has two variables in it, C sized 144×300 and D sized 1×300. Then I split my data to TrainData and TrainLabels like this
TrainData = C(:,1:2:end);TrainLabels = D(1:2:end);
But, I found a warning in TrainLabels = D(1:2: end);, and got a message that "END or colon can only be used to index arrays. This might be an incorrect use."
Why so? Would you fix it? Thank you.
Best Answer