Archive for June, 2009:
Inserting Space between two strings using strcat() in MATLAB
June 5th, 2009 No Comments Posted in Uncategorized
I recently came across this problem where I had to insert a space between two arrays of strings.
Assuming that date and time are both string arrays.
Create a cell array with a space element in it.
space = {char(32)} or space = {’ ‘}
Then, concatenate the two string arrays using
final_result = strcat(date, space, time);