help-octave
[Top][All Lists]
Advanced

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

Re: plotting in grace


From: asha g
Subject: Re: plotting in grace
Date: Thu, 4 Oct 2012 19:15:11 +0800 (SGT)




>>  While googling, I found that octave can plot in both gnuplot and grace.
>>
>> For plotting in grace the data needs to be in ascii form and in columns.
>> Now I can convert my binary data into ascii but it is not appearing as columns. When I tried something that was suggested earlier - it displays on the screen but does not save as a file.
>>
>> I would really appreciate help from someone who has experience doing this.
>>
>> The code I wrote is :
>>
>> load catwalk X y
>> X= X', y = y';
>> save -mat-ascii catwalkascii X
y
>>
>> If this does save as columns, then I can open it after typing xmgrace and import it. But as mine does not save as columns, it is proving to be difficult.
>>
>> Your help appreciated.
>>
>> Thanks
>>
>> Asha G
>> 
>
>if you need to autput your data as columns of numbers you probably should be using "dlmwrite" rather than "save"
>
>c.
>Just tried dimwrite  -mat-ascii catwalkascii X y
>
>Did not save either.
>AG
>
>


How about introducing a struct *say, 's'), assigning data to it and saving using 'save("-text" ...);' ?

Or even without the struct ?

Here is an example from what I'm doing - contents of a files saved using 'save("-text" ...);':

"# Created by Octave 3.0.5, Fri Jul 08 00:11:48 2011 IDT <address@hidden>
# name: accumulated_spectra
# type: struct
# length: 3
# name: MM
# type: cell
# rows: 1
# columns: 1
# name: <cell-element>
# type: complex matrix
# rows: 1
# columns: 589825
 (-78.97504911431373,-3.673076946111337e-14) 
...
".

It _does_ preserve rows and columns info.

Regards,
  Sergei.



Thanks. It is a bit unclear from your work. Can you show how to do it from my example given above ? Columns will be two and rows N where N = 11;
AG
>





reply via email to

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