octave-maintainers
[Top][All Lists]
Advanced

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

Octave Code Contribution


From: John W. Eaton
Subject: Octave Code Contribution
Date: Fri, 27 Feb 2009 15:14:54 -0500

On 27-Feb-2009, Nathan Bliss wrote:

| I'm interested in developing for Octave so that I can add phase
| constellation plots to the gnuplot capabilities. These are the kind
| of constellation plots used in radio comms with I/Q values
| corresponding to real & imaginary points on a phase constellation
| diagram.
| 
| For example, I have an Octave array that contains real and imaginary
| values (complex values). I want to, say, pass this array to gnuplot
| but use some of the specialised native plotting functions of gnuplot
| to label the axes as 'Real' and 'Imaginary' and then to plot each
| complex value in the array as a vector, but where a symbol is drawn
| at the point and with no lines or connections being made between the
| points.
| 
| As far as I can tell this functionality doesn't yet exist in Octave
| or SciLab. These kind of plots are used extensively in mobile
| telecoms radio software and radio signal measurement equipment at
| the demodulation level.
| 
| I would be very grateful for any pointers you can give me for the following:
| 
| 1. What compiler I need to install to write extra functions that
| involve passing data from Octave to gnuplot?
| 
| 2. Information about the Octave API calls I can use and also the
| gnuplot API calls I need to pass data between Octave and gnuplot?
| 
| 3. Do you have an example of how to add a new source code library to
| Octave, add a function that uses one of gnuplot's native plotting
| functions using a gnuplot API call, and then compile everything and
| run this new functionality?

I don't think you should need to do anything directly with gnuplot to
implement some higher-level plotting function like you are describing.
Instead, you should be able to do it all with the existing plotting
functions and by setting properties.  This has the advantage of not
being tied to gnuplot, which may eventually not be the default
plotting engine for Octave.  If there is something you can't do by
using the current plotting capabilities of Octave, then please explain
precisely what you are trying to do and someone will probably be able
to help you.

The current development sources include the function scatter.  Does

  n = 100;
  x = rand (n, 1) + i*rand (n, 1);
  scatter (real (x), imag (x));
  xlabel ("Real");
  ylabel ("Imaginary");

do approximately what you want (see the attached plot)?

jwe

Attachment: foo.pdf
Description: Adobe PDF document


reply via email to

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