MATLAB: How to use variables in mkdir

foldermkdirvariables

Hello;
Let's say I have four different variables (a, b, c, d) and I want to create folders using these variables as the name of my folder (folder name= a.b.c.d) How can I do this using mkdir?
Thanks, Tina

Best Answer

Hi,
what about
a = 'hello'
b = 'world'
c = 12
d = 'xxx'
mkdir([a,'.',b,'.',num2str(c),'.',d])