Error using zeros, Size inputs must be scalar

1 view (last 30 days)
train_data = zeros(num_train_data,1);
I get error on this line. I attached the screenshot of my num_train_data below.
PS Im new to matlab.

Answers (1)

Walter Roberson
Walter Roberson on 4 Sep 2015
num_train_data should be referring to the number of training samples you have, not to the content of the training samples.
  4 Comments
Js Goh
Js Goh on 4 Sep 2015
Edited: Js Goh on 4 Sep 2015
Im doing fingerprint recognition, I have 10 persons and 8 fingerprints images each person. Each image is represent by 862 numbers after feature extraction. Now I want to take 60% of my dataset as training data. How should I calculate the numbers of my training data?
Sry, Im confusing right now.

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!