Error using zeros, Size inputs must be scalar

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.

답변 (1개)

Walter Roberson
Walter Roberson 2015년 9월 4일

0 개 추천

num_train_data should be referring to the number of training samples you have, not to the content of the training samples.

댓글 수: 4

Js Goh
Js Goh 2015년 9월 4일
how should I change my code here? num_train_data = reresult(:,1:48);
reresult is my dataset as screenshot above.
Sry im too new to matlab.
num_train_data = size(reresult,1);
Js Goh
Js Goh 2015년 9월 4일
편집: Js Goh 2015년 9월 4일
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.
I suggest you try nprtool

댓글을 달려면 로그인하십시오.

카테고리

태그

질문:

2015년 9월 4일

댓글:

2015년 9월 4일

Community Treasure Hunt

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

Start Hunting!

Translated by