Question : display sequence in matlab
Answered by : repulsive-rook-rkk6o7ivw6wx
function displaySequence(X,Y)
clrOrder = get(gca,'ColorOrder');
classNames = categories(removecats(Y));
grps = findgroups(Y);
gscatter(1:length(X),X,grps,clrOrder(1:3,:))
legend(classNames)
xlabel('Time (samples)')
ylabel('')
end
Source : https://matlabacademy.mathworks.com/R2019b/portal.html?course=mldl#chapter=11&lesson=1§ion=2 | Last Update : Mon, 30 Mar 20