listbox with exclude option
Mostrar comentarios más antiguos
Hi all,
I have a listbox in my GUI which allow user to exclude certain data points before plotting. My current code is roughly listed as following:
datasetFull = get(hObject,'UserData');
datapointKept=get(handles...,'UserData');
for m = datapointKept
datasetFilter{m}=datasetFull{1,m};
end
datasetForPlot = datasetFilter(~cellfun('isempty',datasetFilter)); % delete empty array
plot(datapointKept,datasetForPlot);
If i have 3 data points in total, I want to exclude data point #1, choose to plot data point#2/#3 using this coding. However, the outcome is... it is still plotting data point #1/#2, it does skip the correct data point, instead it starts from #1 till 'datapointKept' progressively.
May I know how to solve this problem? Thanks!
Respuestas (1)
Jan
el 23 de Nov. de 2015
0 votos
Did you use the debugger to examine the contents of datapointKept? I guess there is a bug in the code, when the corresponding UserData are set, but as long as this part is not posted in the forum, it is impossible to find the problem.
Categorías
Más información sobre Whos en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!