Skip to content
This repository has been archived by the owner on Mar 20, 2024. It is now read-only.

get_session_info.m #47

Open
gaelias opened this issue Jun 15, 2017 · 0 comments
Open

get_session_info.m #47

gaelias opened this issue Jun 15, 2017 · 0 comments

Comments

@gaelias
Copy link

gaelias commented Jun 15, 2017

settings.xml doesn't always (at least when I'm running it) have the processor name as the second attribute (line 38 in the code). Not sure if this is an issue with the code writing the settings file or the way Matlab reads it. I wrote a quick loop to step through the attributes to identify the "name" and tried to submit it for revision but I'm new to working with this kind of collaborative system and am not sure I did it right. I changed lines 37 & 38:

             nodeId = str2num(char(xProcessor.getAttributes.item(0).getValue));
             processorName = char(xProcessor.getAttributes.item(2).getValue);

into the following loop:

            for procAtt = 0:xProcessor.getAttributes.getLength-1
                if strcmp(xProcessor.getAttributes.item(procAtt).getNodeName, 'NodeId')
                    nodeId = str2num(char(xProcessor.getAttributes.item(procAtt).getValue));
                elseif strcmp(xProcessor.getAttributes.item(procAtt).getNodeName, 'name')
                    processorName = char(xProcessor.getAttributes.item(procAtt).getValue);
                end
            end

With the previous code the later code using strcmp to check for the 'Filters/Spike Detector' node (line 44 I believe):

            if strcmp(processorName, 'Filters/Spike Detector')

was not working because it wasn't correctly pulling the "name" attribute. Additionally, the output from the file was not correctly including the processor names as strings in the second column of the output "info."

Edit: code blocks weren't being formatted properly.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant