[Numpy-discussion] The problem with arrays
Tue Sep 22 12:30:17 CDT 2009
On Tue, Sep 22, 2009 at 7:01 PM, Fabrice Silva <firstname.lastname@example.org>wrote:
> Le mardi 22 septembre 2009 à 17:42 +0530, yogesh karpate a écrit :
> > I just tried your idea but the result is same. it didnt help .
> > 2009/9/22 Nadav Horesh <email@example.com>
> > A quick answer with going into the details of your code:
> > try
> > plt.plot(R_time,R_amp,'go',hold=1)
> > (one line before the last)
> > Nadav
> You may separate the computation part and the plotting one by storing
> your results in a R_time and a R_amp array (length a1 arrays).
> Concerning the plotting issue : are you sure the points you want to be
> displayed aren't yet? print the values within the loop :
> >>> print (R_amp, R_time)
> to check your values.
> You may also inspect your graphs to see how many lines they have :
> >>> plt.gca().get_children()
> >>> plt.gca().get_lines()
> might help.
This is the main thing . When I try to store it in array like
R_time=array([R_t[i]]). It just stores the final value in that array when
loop ends.I cant get out of this For loop.I really have this small problem.
I really need help on this guys.
> for i in range(a1):
> data_temp=(bpf[left[i]:right[i]])# left is an array and
> right is also an array
> maxloc=data_temp.argmax() #taking indices of max. value of
> data segment
> maxloc = maxloc-1+left # add offset of present location
> minloc = minloc-1+left # add offset of present location
> R_index = maxloc
> R_t = t[maxloc]
> R_amp = array([maxval])
> S_amp = minval#%%% Assuming the S-wave is the lowest
> #%%% amp in the given window
> #S_t = t[minloc]
> NumPy-Discussion mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion