How to save a changed file?
7 ビュー (過去 30 日間)
古いコメントを表示
I have a bot file (ascii file) with positive and negative values, so my purpose is to change the positive value to NaN (as i did it) and then save the file with the same extension, like change the value of the file, but i don't know how to save the file with the same extension . Here is my file and my code.
clear all
clc
filename='emodnet_format_Ali_new_one.bot';
deliminator = ' ';
bathy=dlmread(filename,deliminator,3,0); % read bathy-data
bathy(bathy>0)=NaN;
save('bathy.bot','-ascii');
I don't know if the final line is correct , or it may change.
1 件のコメント
Walter Roberson
2024 年 12 月 10 日
testing...
dinfo = dir('em*');
filenames = {dinfo.name}
dbtype(filenames{1})
回答 (1 件)
Vidhi Agarwal
2024 年 12 月 10 日
To save the file you can try using "save" function of MATLAB. Refer to the following documentation to read more about it: https://www.mathworks.com/help/matlab/ref/save.html
Hope this helps!
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Get Started with MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!