Create file of different extensions of our own

I am having a matlab code and gui for it. Now i want to develop a software such that user should be able to save data in a file of different extension. Can this be possible in matlab. Please suggest me to do this.

 Accepted Answer

filterSpec = { '*.ext1;, *.ext2', 'Ext1 or Ext2 files (*.ext1;, *.ext2)' };
uiputfile( filterSpec )
will allow you to save files with .ext1 or .ext2 extension.
Obviously you can change what you want to be in there, using just 1 extension or many. If you don't care about niceties you can simply use:
filterSpec = '*.ext1;, *.ext2';
as the rest of the filter spec line is just informational.

More Answers (0)

Tags

Asked:

on 25 Sep 2014

Answered:

on 25 Sep 2014

Community Treasure Hunt

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

Start Hunting!