Matlab code not working, trying to filter 2 arrays
How can i  Plot an array in a graph against its order in array in matlab ??

Example : x= [6,10,12,20] point 1 become 6:1 and point 3= 12:3 for example even after i remove some elemets from this array i want to preserve same order


example of what am trying to do here is to remove all values bellow mean while keep order cause it represent the time in sec's (this is from video processing code):

    m=mean(amp);
    for i=totalframes
        if (amp(i) >= m)
            time(i)=i/framerate;
        end
    end
    amp(amp >= m) = [];
    time(time > 0) = [];
    figure, plot(time,amp) %% plot my curve

P.s: time and amp array was created by Zeros earlier in my code.. 

Thanks
Matlab code not working, trying to filter 2 arrays
===

How can i  Plot an array in a graph against its order in array in matlab ??

Example : x= [6,10,12,20] point 1 become 6:1 and point 3= 12:3 for example even after i remove some elemets from this array i want to preserve same order


example of what am trying to do here is to remove all values bellow mean while keep order cause it represent the time in sec's (this is from video processing code):

    m=mean(amp);
    for i=totalframes
        if (amp(i) >= m)
            time(i)=i/framerate;
        end
    end
    amp(amp >= m) = [];
    time(time > 0) = [];
    figure, plot(time,amp) %% plot my curve

P.s: time and amp array was created by Zeros earlier in my code.. 

Thanks