MATLAB: Add variable Text to the end of the Arrow in a Loop

text;

Hello, I want to ask if it is possibel to combine the '\downarrow' with a variable value in the following function:
text(s-7,Num(s,k),'\downarrow', 'VerticalAlignment', 'baseline','FontSize',5)
I normally use
{c}
instead of
'\downarrow'
to plot the values of the C variable at the specified places…I wonder how to put a down arrow followed by the value of the in each case??? I tired this version:
'\downarrow {c}'
and it just places the {c} text on the chart.
Thanks!!!
D

Best Answer

Are the values in C numeric or text?
Consider using sprintf(), perhaps in combination with strcat(), to construct the string.
One possibility:
strcat({'\downarrow '}, cellstr(num2str(C)))