how can i save feature vectors in a mat file?
1 回表示 (過去 30 日間)
古いコメントを表示
i have 50 rows and infinite(unknown lets say 30,000) columns. how can i use for loop using 50 iterations as there are 50 different images whom feature vectors i am trying to store.. please help me
0 件のコメント
回答 (1 件)
Jan
2016 年 12 月 8 日
FileList = dir('*,jpg');
Result = nan(length(FileList), 30000);
for iFile = 1:numel(FileList)
FileName = FileList{iFile}.name;
... obtain features
Result(iFile, :) = <features>
end
2 件のコメント
Jan
2016 年 12 月 8 日
編集済み: Jan
2016 年 12 月 8 日
Do you see, that your code is gard to read? Omit the empty lines and use the "{} Code" button to see, how code is formatted properly. Please.
It is necessary to reveal, which line causes the error. We cannot guess this, while this detail is shown in your command window.
If the failing line is "Result(iFile, :) = fv;", you have to find out, how you want to store the "30'000" feature. I cannot run your code and cannot guess its intention.
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!