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 ビュー (過去 30 日間)
load ('datos22.dat', '-mat');
for i=1:2:43
datos(:,i)=datos(:,i)+6;
end
save('datos.dat',datos,' -dat')
  2 件のコメント
PeakyClimber
PeakyClimber 2017 年 12 月 29 日
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.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeWorkspace Variables and MAT Files についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by