Hello,
C newbie here. I'd like to be able to plot a simple line graph of an array created in my C-program. I can easily plot an array with Octave but how do I get an array from my C-program to Octave?
Thanks for any help,
OJ
This is a discussion on plot array outside of C-program within the C Programming forums, part of the General Programming Boards category; Hello, C newbie here. I'd like to be able to plot a simple line graph of an array created in ...
Hello,
C newbie here. I'd like to be able to plot a simple line graph of an array created in my C-program. I can easily plot an array with Octave but how do I get an array from my C-program to Octave?
Thanks for any help,
OJ
myprog | octave
Basically, you find out what sort of inputs your plot program can cope with (say from stdin) and you make your C program conform to that interface.
If it's particularly crusty, you may need a file
myprog -out=temp.txt
octave -in=temp.txt
Essentially, a series of printf statements to output the array as text is one way.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
I support http://www.ukip.org/ as the first necessary step to a free Europe.
Thanks for the reply.
I think i kind of did like you said. I sent my output to a text file, then that file into octave.
Thanks again,
OJ