Hello everyone i hope you are doing well. I want to label y axis with the value i get from
Value= unique(whiteLineRows1);
but when i plot it gives the Value= as in the image attached
How can i plot the value on each line
path = 'C:\Users\DELL\Documents\MATLAB\Examples\R2021b\phased\ModClassificationOfRadarAndCommSignalsExample\NewDataset\DatasetGeneration\Detection\ImageDetection\imageclass_001001.png';
[rows, columns, numberOfColorChannels] = size(rgbImage);
if numberOfColorChannels > 1
grayImage = rgbImage(:, :, 3);
[rows, columns, numberOfColorChannels] = size(rgbImage);
[labeledImage, numRegions] = bwlabel(mask);
props = regionprops(labeledImage, 'Area', 'Centroid');
allLengths = [props.Area];
centroids = vertcat(props.Centroid);
whiteLineRows1 = centroids(:, 2);
Value= unique(whiteLineRows1);
str = sprintf('Value %d', Value(k))
yline(Value, 'LineWidth', 2, 'Color', 'r','Label',str);