How can i edit a .mat file
Afficher commentaires plus anciens
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
Réponse acceptée
Plus de réponses (1)
Azzi Abdelmalek
le 11 Jan 2013
Modifié(e) : Azzi Abdelmalek
le 11 Jan 2013
a=10; v=magic(4)
save filename a v
To load your file
load filename
2 commentaires
Kim Nguyen
le 11 Jan 2013
Azzi Abdelmalek
le 11 Jan 2013
Modifié(e) : Azzi Abdelmalek
le 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{:}
Catégories
En savoir plus sur Workspace Variables and MAT Files dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!