How to use tab in disp()?

kame picture kame · Mar 8, 2011 · Viewed 14.5k times · Source
disp(['counter ' num2str(blk) (here I need a tab!!!) 'adc ' num2str(adc_nr)])

Answer

groovingandi picture groovingandi · Mar 8, 2011

Try

disp(['counter ' num2str(blk) 9 'adc ' num2str(adc_nr)])

Explanation: Usually if you want to insert a tab, you put a '\t' in the string. This works well for sprintf, but the disp command doesn't interpret it properly. So one solution is to put the ASCII value of the tab directly, which is '9'.