My aim is to generate a training set. So, I have text file including number of images, I select randomly some images and I would like to save them in an other text file.
Can someone help me to correct my MATLAB source code?
noOfImage=176;
trainingSet1= 10;
P1 = myrandint(trainingSet1,1,[1:noOfImage],'noreplace')
P1 = sort(P1);
inputFileID1 = fopen('malin.txt','rt')
while ~feof( inputFileID1)
tline1=fgetl(inputFileID1)
outputFileID = fopen('train.txt','wt');
count1 = 0;
for i=1:trainingSet1
for j=count1+1:noOfImage
count1 = count1+1;
if count1