You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

RunDataConvertion.m 813B

12345678910111213141516171819202122
  1. clear;
  2. clc;
  3. dataset_dir = 'Datasets_Ascii/' ; %' '; % sigal 13.8.12
  4. output_dir = 'output3/'
  5. files = [dir(strcat(dataset_dir,'graph_32.txt'))];% sigal 13.8.12
  6. numNodes = 32;
  7. for i = 1:size(files,1)
  8. file = files(i).name;
  9. [graph] = LoadAsciiGraph(dataset_dir, file, numNodes, output_dir);
  10. [edges] = SaveAsciiGraph(strcat(dataset_dir,output_dir), file, graph);
  11. date_now = clock;
  12. date_now = strcat(num2str(date_now(1)),'_',num2str(date_now(2)),'_', num2str(date_now(3)),'_', num2str(date_now(4)), num2str(date_now(5)),'_', num2str(date_now(6)));
  13. out_file = sprintf('res_%s_%s.mat', file, date_now);
  14. if strcmp(dataset_dir,' ')== 0 || strcmp(output_dir,' ')== 0
  15. out_file = strcat(dataset_dir, output_dir, out_file);
  16. end
  17. save(out_file);
  18. end