필터 지우기
필터 지우기

Save a file with own extension in menu GUI

조회 수: 1 (최근 30일)
Fiboehh
Fiboehh 2011년 4월 30일
Hey, my program generates a ascii file and i need a save function that can save this file with a name chosen by the user and the extension of the ascii file is always .sin. The user must see a foldermenu (window) where all the files in are viseble.
filemenufcn(gcbf,'FileSaveAs')
doesnt give the right exentension
and
filemenufcn(gcbf,'FileSaveAs','*.sin')
doesnt work either. Thx in advance.

채택된 답변

dm
dm 2011년 5월 1일
Something like this?
[filename pathname] = uiputfile('*.sin','Save file as');
save(fullfile(pathname,filename),'varname','-ascii')
% or exchange last line with one of the following:
% save(fullfile(pathname,filename),'varname','-ascii','-tabs')
% save(fullfile(pathname,filename),'varname','-ascii','-double')
% save(fullfile(pathname,filename),'varname','-ascii','-double','-tabs')

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Workspace 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