string formatting in MATLAB -



string formatting in MATLAB -

i want inquire quite simple question. i'm writing function converting raw image bmp. function name raw2bmp() want work file lena.raw type function raw2bmp('lena.raw'). function produces output bmp image. want name lena.raw.bmp. question how file name array of symbols?

you can utilize sprintf() format string, this:

file_to_save = sprintf('%s.bmp', input_file);

then can save result file_to_save.

matlab string-formatting

Comments

Popular posts from this blog

assembly - What is the addressing mode for ld, add, and rjmp instructions? -

vowpalwabbit - Interpreting Vowpal Wabbit results: Why are some lines appended by "h"? -

Is there a way to convert an HTML page styled with Bootstrap CSS into email-compatible html? -