Passing variable filename to movie2avi

Here's the basis for what I'm trying to do:
fname = inputdlg('Enter Filename without extension','Input');
name = strcat(fname,'.avi');
movie2avi(handles.movie, name,'fps',handles.fps,...
'compression','None')
This gives an error: "Invalid input arguments. Second input argument must be a filename." Is this a limitation of matlab that the argument has to be a string, and can't be a variable pointing to a string? If so, is there a way around this?
Thanks, Neil

1 件のコメント

Sara
Sara 2014 年 7 月 9 日
what is the value of the variable "name"?

サインインしてコメントする。

 採用された回答

Ben11
Ben11 2014 年 7 月 9 日

0 投票

Maybe try this:
fname = inputdlg('Enter Filename without extension','Input');
name = strcat(fname,'.avi');
movie2avi(handles.movie, name{1},'fps',handles.fps,...
'compression','None')
Since the answer to the input dialog is stored in a cell array...

2 件のコメント

Neil Ryan
Neil Ryan 2014 年 7 月 9 日
Perfect! Thanks!
Ben11
Ben11 2014 年 7 月 9 日
great!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeStartup and Shutdown についてさらに検索

タグ

質問済み:

2014 年 7 月 9 日

コメント済み:

2014 年 7 月 9 日

Community Treasure Hunt

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

Start Hunting!

Translated by