how to save the varname contains different characters (attached) as a cell array format using GUI in matlab ?

1 次查看(过去 30 天)
Below is the code displaying the variables inside the loop. How to save these displayed variables as a cell format using GUI in matlab?
for varid=0:nvars-1
[varname, xtype(i,:), dimids, numatts(i,:)] = netcdf.inqVar(ncid(i,:),varid);
disp(['--------------------< ' varname ' >---------------------'])
end
  4 个评论
Geoff Hayes
Geoff Hayes 2016-4-10
Manoj - please clarify what you mean as cell format. Do you wish to save the data to a mat file or a text file or something else? Please describe the format of the file.

请先登录,再进行评论。

采纳的回答

Walter Roberson
Walter Roberson 2016-4-11
for varid=0:nvars-1
[varname, xtype(i,:), dimids, numatts(i,:)] = netcdf.inqVar(ncid(i,:),varid);
outstring{varid+1} = ['--------------------< ' varname ' >---------------------']);
end
[outfile, outpath] = uiputfile('*.mat');
if ischar(outfile)
%if the user did not cancel
filename = fullfile(outpath, outfile);
save(filename, 'outstring');
end

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 String Parsing 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by