In this function [clustCent​,data2clus​ter,cluste​r2dataCell​] = MeanShiftC​luster(dat​aPts,bandW​idth,plotF​lag);.what is plot flag.The function program given below

8 ビュー (過去 30 日間)
ATHIRA P M
ATHIRA P M 2018 年 11 月 29 日
回答済み: Geoff Hayes 2018 年 11 月 29 日
In this function [clustCent,data2cluster,cluster2dataCell] = MeanShiftCluster(dataPts,bandWidth,plotFlag);.what is plot flag.The function program file is attached.

回答 (1 件)

Geoff Hayes
Geoff Hayes 2018 年 11 月 29 日
Athira - it looks l like this boolean/logical flag is used to plot the data or not
if plotFlag
figure(12345),clf,hold on
if numDim == 2
plot(dataPts(1,:),dataPts(2,:),'.')
plot(dataPts(1,myMembers),dataPts(2,myMembers),'ys')
plot(myMean(1),myMean(2),'go')
plot(myOldMean(1),myOldMean(2),'rd')
pause
end
end
Note that if you don't provide a value for this input parameter, then the code defaults this flag to false (and so the above figure with plots will not be created).

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by