Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use tab in disp()?

disp(['counter ' num2str(blk) (here I need a tab!!!) 'adc ' num2str(adc_nr)])
like image 601
kame Avatar asked Mar 08 '11 12:03

kame


People also ask

How do you insert a tab in the Disp command?

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.

What is the use of DISP function in C++?

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.

What is Disp Disp in MATLAB?

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.

How do you display the value of a variable in Disp?

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.


1 Answers

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'.

like image 175
groovingandi Avatar answered Oct 03 '22 15:10

groovingandi