You need to convert strings in foo.var1 to characters, assuming the 1st column name in foo and bar are both 'var1'.
foo.var1_converted = cellfun(@(x) char(x),foo.var1,'UniformOutput',false);
then you will get a new column 'var1_converted' in foo, which contains the converted characters from strings in column 'var1'.
new_tab = join(foo,bar,'leftkeys','var1_converted','rightkeys','var1');
you will get your joined table.