Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Loading single variable matfile into a variable

Status
Not open for further replies.

TJ22

Computer
Mar 31, 2006
1
I am writing an application where the user specifies multiple matfiles. I need to load those matfiles into some variables. these matfiles only contain a single array 'x'. I need to load those values into another variable 'y'. The problem is when I do y = load('x.mat'); I get a structure for y containing a variable x like so y = x[1x400 double] so to access the array I have to do y.x . I cant have y must be an array not a structure containing an array. Is there anyway to load the mat file array directly into y? The mat file names are dynamic and so I cant just access the value using y.x because 'x' could be 'run' or 'bob'. Any ideas?
 
Replies continue below

Recommended for you

Status
Not open for further replies.

Part and Inventory Search

Sponsor