Asked by Shan Sha
on 14 Sep 2018

It throws error in the following lines:

classIDs(i) = str2num(tline(index+5:end));

the code :

tline = fgetl(fid); % get the number of image samples

i = 0;

while 1

tline = fgetl(fid);

if ~ischar(tline)

break;

end

index = findstr(tline,'.');

i = i+1;

filenames(i) = str2num(tline(1:index-1))+1;% the picture ID starts from 0, but the index of Matlab array starts from 1

classIDs(i) = str2num(tline(index+5:end));

end

Tell me what i have to change. I used outex tc 00010 and now I have changed to tc14. Thanks in advance

Answer by Dilip Kunderu
on 19 Sep 2018

Shan Sha
on 24 Sep 2018

other dependencies mean what does it mean?

Shan Sha
on 3 Oct 2018

Shan Sha
on 4 Oct 2018

Sign in to comment.

Opportunities for recent engineering grads.

Apply Today
## 7 Comments

## Dilip Kunderu (view profile)

## Direct link to this comment

https://www.mathworks.com/matlabcentral/answers/419009-i-have-a-dataset-with-24-classes-and-4320-samples-and-i-m-having-program-for-it-if-i-use-the-same-p#comment_611775

## Shan Sha (view profile)

## Direct link to this comment

https://www.mathworks.com/matlabcentral/answers/419009-i-have-a-dataset-with-24-classes-and-4320-samples-and-i-m-having-program-for-it-if-i-use-the-same-p#comment_611840

## Image Analyst (view profile)

## Direct link to this comment

https://www.mathworks.com/matlabcentral/answers/419009-i-have-a-dataset-with-24-classes-and-4320-samples-and-i-m-having-program-for-it-if-i-use-the-same-p#comment_611843

## Shan Sha (view profile)

## Direct link to this comment

https://www.mathworks.com/matlabcentral/answers/419009-i-have-a-dataset-with-24-classes-and-4320-samples-and-i-m-having-program-for-it-if-i-use-the-same-p#comment_611846

## Sachin Meena (view profile)

## Direct link to this comment

https://www.mathworks.com/matlabcentral/answers/419009-i-have-a-dataset-with-24-classes-and-4320-samples-and-i-m-having-program-for-it-if-i-use-the-same-p#comment_617586

## Shan Sha (view profile)

## Direct link to this comment

https://www.mathworks.com/matlabcentral/answers/419009-i-have-a-dataset-with-24-classes-and-4320-samples-and-i-m-having-program-for-it-if-i-use-the-same-p#comment_617617

## Shan Sha (view profile)

## Direct link to this comment

https://www.mathworks.com/matlabcentral/answers/419009-i-have-a-dataset-with-24-classes-and-4320-samples-and-i-m-having-program-for-it-if-i-use-the-same-p#comment_617746

Sign in to comment.