read data from a structure in matlab -
I have to load some data into the structure.
I put it inside the function.
Assuming that my structure is called
and data The How can I access it within a function? How can I pass the structure name? In this case corrected_data ... loaddata is in loaddata.
function loaddata_struct (path, namestruct) loaddata = load (path); Data = loaddata.corrected_data; This should be changed depending on the arguments of% function (name-structure in this case)
field of the following code structure with the name passed to loaddata_struct Will return function:
function data = loaddata_struct (path, namestruct) loaddata = load (path); Data = load data (Nominated); End
Comments
Post a Comment