about summary refs log tree commit diff
path: root/sourcecodes/parameter_learning/createSVG.m
diff options
context:
space:
mode:
Diffstat (limited to 'sourcecodes/parameter_learning/createSVG.m')
-rw-r--r--sourcecodes/parameter_learning/createSVG.m9
1 files changed, 2 insertions, 7 deletions
diff --git a/sourcecodes/parameter_learning/createSVG.m b/sourcecodes/parameter_learning/createSVG.m
index 2d190b68..47894c1b 100644
--- a/sourcecodes/parameter_learning/createSVG.m
+++ b/sourcecodes/parameter_learning/createSVG.m
@@ -16,10 +16,6 @@ function  [ ] = createSVG( pre )
    %
 
 
-nnodefile=strcat(pre,'nnode.txt');
-fnnode = fopen(nnodefile,'r');
-nnodes = fscanf(fnnode,'%d');
-
 %  open file for input, include error handling
 dfile=strcat(pre,'structure_input.txt');
 
@@ -30,20 +26,19 @@ end
 
 % Read in first line to get the number of nodes and the node labels.
 buffer = fgetl(fin);    %get header line as a string
-
+nnodes = numel(strfind(buffer,"\t")) + 1;
 labels = cell(1,nnodes);
 for j=1:nnodes
-    j, buffer
     [next,buffer] = strtok(buffer);
     labels{j} = next;
 end
 
+
 % Read in the edges
 edges = cell(nnodes,nnodes);
 for i = 1:nnodes
     buffer = fgetl(fin);
     for j = 1:nnodes
-	 i, j, buffer
          [next,buffer] = strtok(buffer);
          edges{i,j} = next;
     end