From: Sunny on 4 Jun 2010 15:52 Hi all, I'm putting together a GUI that will take out an instance of data of Gait trials, and represent them in slices. I'm doing this by incorporating a graph with a scroll bar. I can get it to "work", but the problem is that the scroll bar runs by itself from 1 to the total number of gait cycles. Ideally, I want to be able to push right on the scroll bar, and have each click return a value of 1, which i can add to a dynamic variable. Anyway, my attempt at this is shown below. Any help would be greatly appreciated. gait_size = interv2_num - interv1_num; matsize = size(datavar.data); rows = matsize(1,1); %change this later sliderval = floor(rows/gait_size); set(handles.slider2,'Min',1); set(handles.slider2,'Max',sliderval); gait = 0; while (gait < sliderval) gait = 1+gait; start = (gait)*gait_size; %disp(start:(start+gait_size)) ret = datavar.data(start:(start + gait_size - 1),:); set(handles.slider2,'Value',gait); axes(handles.axes2) plot(ret(:,2:end)); end
From: ImageAnalyst on 4 Jun 2010 15:55 Then don't have a loop from 1 to the slider value. Just set gait equal to the slider value and do it once.
|
Pages: 1 Prev: unreadable axis labels using latex interpreter when copying figures to powerpoint Next: SVM |