I want to load specific column form .mat file already exist in the work space after I load it how should I write then ?
Asked
Active
Viewed 8,457 times
1
-
Yes exactly that is my problem .. Thus, I should load all variables then access a specific one – Ocean Blue Apr 02 '12 at 10:48
1 Answers
3
You can access part of a variable saved in a MAT file using MATFILE constructor (available since R2011b). Check my answer to another similar question.
For example, if you have matrix a
saved in matlab.mat
file you constract the matfile object as
matObj = matfile('matlab.mat');
Then you can access 2nd column like x = matObj.a(:,2);
.