This question is closed. Reopen it to edit or answer.
how do I place the text on the first co ordinate of the plot?
1 view (last 30 days)
I am potting trajectories of vehicles (time-space plots) and following is my code %% Read data table = readtable('E:\vehdata11.xlsx'); VehicleNos = unique(table.VehicleID);
for idx = 1:numel(VehicleNos) n = VehicleNos(idx); sb = table(table.VehicleID == n,:); labels=cellstr(num2str(n)); Time= sb.time; x = sb.time; y = sb.x; tin = min(x); t1 = x - tin; y1 = t1*11.04; y2 = y - y1;
%% plotting for time interval
i = (Time>20 & Time<=25);
end Now the position of text is on the maximum (x,y) coordinate But since my graph is not linear and fluctuating I want the labels to be on the first co ordinate text(x(1), y(1),labels) is not working. How do I do that?