How can i edit a .mat file
Show older comments
I have a .mat file name.mat. It contains information such as and when I open it the import wizard opens. now say the data in the import wizard is as follows:
|var_name | Ixx | Iyy | Izz
A 1 2 3
B 4 5 6
C 7 8 9
Now say I wanted to go in and update the numbers to 2-10 -- how do I do this? Or, how can I create a .mat file?
I tried using the import wizard and creating my own, but when I do, it doesn't include having the variable names in the same table because they're letters and not numbers.
Thanks
Accepted Answer
More Answers (1)
Azzi Abdelmalek
on 11 Jan 2013
Edited: Azzi Abdelmalek
on 11 Jan 2013
a=10; v=magic(4)
save filename a v
To load your file
load filename
2 Comments
Kim Nguyen
on 11 Jan 2013
Azzi Abdelmalek
on 11 Jan 2013
Edited: Azzi Abdelmalek
on 11 Jan 2013
fid=fopen('file1.txt')
x=textscan(fid,'%s %f %f %f')
fclose(fid)
out=cell2mat(x(2:end))
% to get the characters
d=x(1)
lett=d{:}
Categories
Find more on Workspace Variables and MAT Files in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!