Plot problem.. ?? No sign at all

Ritchy lelis ritchy_gato at hotmail.com
Sun Jul 11 12:39:07 EDT 2010


On 11 jul, 13:28, Johan Grönqvist <johan.gronqv... at gmail.com> wrote:
> 2010-07-11 02:12, Ritchy lelis skrev:
>
> > On 7 jul, 08:38, Johan Grönqvist<johan.gronqv... at gmail.com>  wrote:
>
> > About the plot draw it's a curve that it's a set of points wich it's
> > the result of the comput of the Vref and Vi together. I don't know if
> > i had to make a break instruction (like in other's languages) after
> > the "If" instructions if i want the else-condition to be executed? ...
> > (do you have some sujestions?)
>
> I would have expected a code structure similar to this:
>
> (NOTE: This is a very inefficient solution, and not the one suggested
> earlier, but it is closer to the code snippet you posted originally, and
> it does produce a plot.)
>
> ----------------------
> import numpy as np
> import matplotlib.pyplot as plt
> Vref = np.linspace(1,20, 100)
> Vi = np.linspace(1,10,100)
>
> for ref in Vref: # Loop over Vref and Vi
>      for i in Vi:
>          if  i > ref/4: # Compute V0
>              V0 = 2*i-ref
>          elif (-ref/4) <= ref and ref <= ref/4:
>              V0 = 2*i
>          elif i < -ref/4:
>              V0 = 2*i+ref
>          plt.plot(i, V0, ".") # Plot one single point at x = i, y = V0
> plt.show() # Display the plot in a window
> ----------------------
>
> > Anyway i have a picture of a tuturial that i found but in this forum i
> > can't post it. That pic would show what a really want...
>
> Can you give a link?
>
>
>
> > Relatively to the axis, the Vi takes the x-axis and the Vref takes the
> > y-axis.
>
> To me this sound like you want to make a 3D-plot, as there is the
> x-axis, the y-axis, and V0. Is this correct? Is V0 on a z-axis?
>
>
>
> > As i said, i have a good 2 pic of a doc that has the information about
> > this ADC that i'm developing.
>
> I looked on wikipedia
> <http://en.wikipedia.org/wiki/Analog-to-digital_converter>, and saw some
> figures. Is any of those similar to what you look for?
>
> I see that they have (Vi - Vref) on the x-axis, and the computed value
> on the y-axis.
>
> Regards
>
> Johan

Hi

Yes those fig look's familiar to me but for now the objective its to
get that residue transfer function (1.5-Bit-Per-Stage Pipelined ADC).

I found in http://amesp02.tamu.edu/~sanchez/ADC-pipeline_lecture.PDF
there are some fig and explanations on page's 9-13. Can you take a
look there please?

Also you can take a look in http://www.maxim-ic.com/app-notes/index.mvp/id/1023
(I think there it´s more information than the first link i gave you).

I'll be waiting for sujestions.

Thank's




More information about the Python-list mailing list