how to let user define a name of avi file

조회 수: 2 (최근 30일)
Jakub
Jakub 2013년 4월 11일
Hi, im making avi file using movie2avi function. im wondering if there is a way to let user choose a name of that avi file...i tried input function but nothing worked so far...Thanks!!
  댓글 수: 1
Matt Kindig
Matt Kindig 2013년 4월 11일
Why didn't input work? Can you post your code?
You also might want to look at uiputfile(), a GUI version of a file choose prompt.

댓글을 달려면 로그인하십시오.

채택된 답변

per isakson
per isakson 2013년 4월 11일
편집: per isakson 2013년 4월 11일
"... nothing worked so far ..."
There are many ways to let the user provide a filename. This is the simplest I can think of.
>> filespec = input('Please give a filename: ');
Please give a filename: 'c:\temp\my.avi'
>> disp(filespec)
c:\temp\my.avi
>> movie2avi( mov, filespec )
Undefined function or variable 'mov'.
>>
I had not assigned a value to mov.
You must describe your problem in some more detail.
  댓글 수: 1
Jakub
Jakub 2013년 4월 12일
Thanks, its working. This is the part:
filespec = input('Name of avi file:', 's');
movie2avi(handles.F, filespec,'fps',2);
this is part of my code. problem was in name of variable - filespec. i was creating variable filename and all avi files were names filename.avi

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Event Functions에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by