help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Data Conversion


From: Thomas D. Dean
Subject: Data Conversion
Date: Sun, 10 Feb 2013 22:03:19 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0

I want to extract r, theta data from a xpdf polar plot.  I found a pdf
of the html page somewhere...  Or, maybe converted it????

http://www.robot-electronics.co.uk/htm/srf04tech.htm

I used

> pdftocairo -jpeg srf04tech.pdf xx.jpg
> mv xx-4.jpg srf04.jpg  ## the plot is on page 4
> g3data srf04.jpg

I set the left edge of the plot as X1 == -70
the right edge of the plot as X2 == 70
the bottom of the plot as Y1 == -70
the top of the plot as Y2 == 70

I started at the left of the plot, near x==0 and went CCW around the
plot marking the plot.  I saved the data in srf04.array.  The x,y data
is below.

octave> load('srf04.array')
octave> plot(srf04(:,1),srf04(:,2)

This results in a plot that looks like the one in srf04tech.pdf

I want to change the data into r, theta with the range the same as that shown on the original plot.

octave> SRF04.x=srf04(:,1);
octave> SRF04.y=srf04(:,2);
octave> SRF04.desc="Taken from a polar plot in srf04tech.xpdf by g3data"
octave> SRF04.r=hypot(SRF04.x, SRF04.y);
octave> SRF04.theta=atan2(SRF04.y, SRF04.x);
octave> polar(SRF04.theta, SRF04.r)

Again, this is very close to the plot in srf04tech.pdf.

I want to make a polar plot with circular grids, the outter 0db and the inner -35db as in srf04tech.pdf.

I can not seem to make the mapping.  How do I get a circular grid?

Tom Dean

octave> [SRF04.x, SRF04.y]
ans =
  -29.71930   -1.70732
  -22.84211   -5.60976
  -15.96491   -9.02439
  -17.92982  -10.97561
  -19.89474  -12.92683
  -16.45614  -12.92683
  -16.45614  -15.36585
  -14.49123  -15.85366
  -12.52632  -13.90244
   -9.08772  -11.95122
   -9.57895  -13.41463
  -10.07018  -15.36585
   -7.61404  -13.90244
   -5.15789  -10.97561
   -5.15789  -15.36585
   -4.17544  -15.85366
   -3.68421  -19.26829
   -2.70175  -22.19512
   -0.73684  -20.24390
    0.24561  -14.39024
    1.22807  -18.29268
    3.68421  -21.70732
    4.66667  -17.80488
    5.15789  -15.85366
    5.64912  -13.41463
    5.64912  -10.97561
    7.61404  -13.41463
    9.08772  -12.43902
   11.05263  -14.87805
   12.03509  -13.41463
   16.45614  -15.85366
   17.43860  -13.41463
   19.89474  -12.92683
   19.89474  -11.46341
   16.94737   -8.53659
   18.91228   -7.56098
   29.71930   -2.68293
   30.21053   -1.70732
   29.71930   -1.21951
   21.85965    3.17073
   20.87719    3.65854
   22.35088    5.12195
   26.28070    8.53659
   28.73684   11.95122
   29.71930   12.43902
   29.22807   16.82927
   30.21053   22.68293
   31.19298   25.60976
   31.68421   38.78049
   29.22807   49.51220
   24.31579   58.78049
   10.56140   67.56098
    0.73684   70.00000
  -11.05263   67.56098
  -23.33333   58.29268
  -28.73684   49.02439
  -30.70175   40.24390
  -30.21053   28.53659
  -28.73684   20.24390
  -28.73684   15.85366
  -28.24561   12.43902
  -25.78947    9.51220
  -23.33333    7.07317
  -19.89474    4.14634
  -26.77193    0.73171
  -29.22807   -1.21951


reply via email to

[Prev in Thread] Current Thread [Next in Thread]