To import device parameters in Matlab, you need to have a data file that contains these parameters.
main.m36 chars2 lines
importdata
function in Matlab to read in the data from the file:main.m29 chars2 lines
For example, if your file contains two columns of data (one column for parameter names and one column for parameter values), you can create a structure to hold the parameter names and values as follows:
main.m69 chars4 lines
Here, we use a loop to go through each row in the imported data and assign the first column as the field name in the structure and the second column as the field value.
param_struct
structure to access the individual device parameters in your Matlab code:main.m114 chars3 lines
gistlibby LogSnag