disp(['counter ' num2str(blk) (here I need a tab!!!) 'adc ' num2str(adc_nr)])
Explanation: Usually if you want to insert a tab, you put a ' ' in the string. This works well for sprintf, but the dispcommand doesn't interpret it properly.
We use the disp function to display the value stored inside a variable without printing the name of the variable. It can be used if we want our output to look neat, without any other information except the actual output.
Introduction to Matlab disp Disp function is used in MATLAB to display the output of any code without displaying the input variables. This function can be used in cases where our code is not very long or easy to understand, and there is no need of displaying the input variables.
disp(X) displays the value of variable X without printing the variable name. Another way to display a variable is to type its name, which displays a leading “X =” before the value.
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'.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With