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

get_session_info.m #47

Open
Open

Description

@gaelias

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.

Activity

  1. added a commit that references this issue on Oct 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions