I am writing a function to append new data to an existing structure (output). I want the results of every subject to be compared to the corresponding results of every other subject, but I need it to append the results onto an existing mat file and not overwrite it.
My attempt so far has been to create a new empty substructure (output.subnum), and then to add a file name and comparisons field. I want comparisons itself to be a structure, organized by ysubject comparison. The desired output structure I want is:
for every x and y.
Below is what I have so far attempted. n is the subject in the list I want to start with and y is the number of subjects I can do:
function output = hcp_compare(hcp,output,n,y)
However, when I do this, I get the following error:
??? A dot name structure assignment is illegal when the structure is empty.
Use a subscript on the structure.
Error in ==> hcp_compare_orig at 18
And I just do not get what I need to do. I have gone through this page and this page , but it also did not work for me and I don't really understand what they're doing to boot. So can anyone help please?