Skip to content
Discussion options

You must be logged in to vote

Is this a Matlab string issue or an MATNWB issue?

addRow expects name-value pairs as separate arguments. However, it looks like you are trying to pass a single string containing all the arguments. MATLAB doesn't automatically parse a string into separate arguments. If you want to construct rowData as a single argument, I think you would need to use a struct:

rowData = struct('start_time', 0.1, 'stop_time', 1.2, 'fpOn', NaN);
trials.addRow(rowData);

or a cell-array

rowArgs = {'start_time', 0.1, 'stop_time', 1.2, 'fpOn', NaN};
trials.addRow(rowArgs{:});  % The {:} expands the cell array

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by JustinKillebrew
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants