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

loaddata

and data

The is in loaddata.

How can I access it within a function?

  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)  

How can I pass the structure name? In this case corrected_data ...

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

Popular posts from this blog

HTML/CSS - Automatically set height width from background image? -

php - Mysql Show Process - Sleep Commands and what to do -

c - What is the address of buf (the local variable in the main function)? -