Hello, I have a column vector that I use for x values for a Bar Chart from data extracted from a UITable.

` Y=cell2mat(data(:,4)) X=data(:,2); Xdata = categorical(X); X = reordercats(Xdata,X); b1=bar(X,Y,'Parent',app.UIAxes2);`

My x data (Column vector) is one of 3 numbers 405, 532 or 660.

The data can be any of these and with any number of repeats e.g

`405405405405405`

or

`405 532532660405`

The problem is the bar chart cannot handle repeat values. I'd still like to plot and thought one way would be to identify repeats and place an _ with a number, but am not sure how to

e.g

`405405405405405`

becomes

`405_1405_2405_3405_4405_5`

and

`405 532532660405`

becomes

`405_1532_1532_2660405_2`

Thanks for any help

## Best Answer