How can I use the save function in matlab to save a variable in the workspace, which is actually a two dimensional table, into an existing .dat file from which I previously loaded that variable?

2 vues (au cours des 30 derniers jours)
load ('datos22.dat', '-mat');
for i=1:2:43
datos(:,i)=datos(:,i)+6;
end
save('datos.dat',datos,' -dat')
  2 commentaires
PeakyClimber
PeakyClimber le 29 Déc 2017
Thank you but my problem is that I loaded a variable which is composed of of a 46x43 data table from a.dat file, using "load" function with -mat extension. Afterwards I made some changes in such variable table (the "for" function you see above), and then what I want is to overwrite the firstly used .dat file with the modified values and save. There must be something that can be done, my teacher is asking for it.

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Workspace Variables and MAT Files dans Help Center et File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by