Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TugboatEng 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
Joined
Mar 31, 2006
Messages
1
Location
US
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?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top