Spaces:
Sleeping
Sleeping
Commit ·
1fb895a
1
Parent(s): 1b1c01c
fixed matlab
Browse files- .DS_Store +0 -0
- MATLAB/.DS_Store +0 -0
- MATLAB/main.m +1 -1
- MATLAB/visualize_app.mlapp +0 -0
- MATLAB/visualize_connectedNodes_continuous.m +19 -13
.DS_Store
CHANGED
|
Binary files a/.DS_Store and b/.DS_Store differ
|
|
|
MATLAB/.DS_Store
CHANGED
|
Binary files a/MATLAB/.DS_Store and b/MATLAB/.DS_Store differ
|
|
|
MATLAB/main.m
CHANGED
|
@@ -15,7 +15,7 @@ function display_elementsForKey(connectionsMap, key)
|
|
| 15 |
end
|
| 16 |
end
|
| 17 |
|
| 18 |
-
data = readtable('
|
| 19 |
data = renamevars(data,"#CUI1","CUI1");
|
| 20 |
data = data(1:1000,:);
|
| 21 |
|
|
|
|
| 15 |
end
|
| 16 |
end
|
| 17 |
|
| 18 |
+
data = readtable('MGREL.RRF', Delimiter='|', FileType='text', NumHeaderLines=0, VariableNamingRule='preserve');
|
| 19 |
data = renamevars(data,"#CUI1","CUI1");
|
| 20 |
data = data(1:1000,:);
|
| 21 |
|
MATLAB/visualize_app.mlapp
CHANGED
|
Binary files a/MATLAB/visualize_app.mlapp and b/MATLAB/visualize_app.mlapp differ
|
|
|
MATLAB/visualize_connectedNodes_continuous.m
CHANGED
|
@@ -2,7 +2,7 @@ function visualize_connectedNodes_continuous()
|
|
| 2 |
% Read the data and create the connections map
|
| 3 |
data = readtable('../MGREL.RRF', 'Delimiter', '|', 'FileType', 'text', 'NumHeaderLines', 0, 'VariableNamingRule', 'preserve');
|
| 4 |
data = renamevars(data, '#CUI1', 'CUI1');
|
| 5 |
-
data = data(1:
|
| 6 |
|
| 7 |
connectionsMap = containers.Map('KeyType', 'char', 'ValueType', 'char');
|
| 8 |
|
|
@@ -13,17 +13,23 @@ function visualize_connectedNodes_continuous()
|
|
| 13 |
connectedNode = data{i, 'CUI2'};
|
| 14 |
char_connectedNode = char(connectedNode);
|
| 15 |
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
end
|
| 28 |
|
| 29 |
% Loop for continuous interaction
|
|
@@ -32,7 +38,7 @@ function visualize_connectedNodes_continuous()
|
|
| 32 |
prompt = 'Enter a key (or type "exit" to quit):';
|
| 33 |
dlgtitle = 'Input';
|
| 34 |
dims = [1 50];
|
| 35 |
-
definput = {'
|
| 36 |
userInput = inputdlg(prompt, dlgtitle, dims, definput);
|
| 37 |
|
| 38 |
% Check if user canceled the dialog or typed "exit"
|
|
|
|
| 2 |
% Read the data and create the connections map
|
| 3 |
data = readtable('../MGREL.RRF', 'Delimiter', '|', 'FileType', 'text', 'NumHeaderLines', 0, 'VariableNamingRule', 'preserve');
|
| 4 |
data = renamevars(data, '#CUI1', 'CUI1');
|
| 5 |
+
data = data(1:50000,:);
|
| 6 |
|
| 7 |
connectionsMap = containers.Map('KeyType', 'char', 'ValueType', 'char');
|
| 8 |
|
|
|
|
| 13 |
connectedNode = data{i, 'CUI2'};
|
| 14 |
char_connectedNode = char(connectedNode);
|
| 15 |
|
| 16 |
+
rel = data{i, 'REL'};
|
| 17 |
+
char_rel = char(rel);
|
| 18 |
+
|
| 19 |
+
if char_rel == "RN" || char_rel == "RB"
|
| 20 |
+
disp(char_node)
|
| 21 |
+
if isKey(connectionsMap, char_node)
|
| 22 |
+
connectionsMap(char_node) = [connectionsMap(char_node), '|', char_connectedNode];
|
| 23 |
+
else
|
| 24 |
+
connectionsMap(char_node) = char_connectedNode;
|
| 25 |
+
end
|
| 26 |
+
|
| 27 |
+
if isKey(connectionsMap, char_connectedNode)
|
| 28 |
+
connectionsMap(char_connectedNode) = [connectionsMap(char_connectedNode), '|', char_node];
|
| 29 |
+
else
|
| 30 |
+
connectionsMap(char_connectedNode) = char_node;
|
| 31 |
+
end
|
| 32 |
+
end
|
| 33 |
end
|
| 34 |
|
| 35 |
% Loop for continuous interaction
|
|
|
|
| 38 |
prompt = 'Enter a key (or type "exit" to quit):';
|
| 39 |
dlgtitle = 'Input';
|
| 40 |
dims = [1 50];
|
| 41 |
+
definput = {'C0013902'};
|
| 42 |
userInput = inputdlg(prompt, dlgtitle, dims, definput);
|
| 43 |
|
| 44 |
% Check if user canceled the dialog or typed "exit"
|