How to append underscore to name of image?

Hi
How to append underscore to the variable name or name of image?Eg:a_20.how to a concatenate 'a' and '_'='a_'

 採用された回答

Iain
Iain 2013 年 6 月 3 日

0 投票

You can concatenate strings:
['hello' ' ' 'world' '_' 'a' '.jpg']
['name' '_' num2str(number)]
etc.

その他の回答 (1 件)

Matt J
Matt J 2013 年 6 月 3 日
編集済み: Matt J 2013 年 6 月 3 日

0 投票

You don't enumerate different images this way, if that's what you mean. You use cell arrays or multi-dimensional indexing
a(:,:,20) = theImage;
or
a{20} = theImage;
If that's not what you mean, please clarify. It seems like it should be very easy to modify the name of the variable, just by assigning to the new name and clearing the old one if needed
a_=a; clear a

カテゴリ

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

質問済み:

2013 年 6 月 3 日

Community Treasure Hunt

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

Start Hunting!

Translated by