help-octave
[Top][All Lists]
Advanced

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

Re: Read a CSV file and plot a graph


From: Renato S. Yamane
Subject: Re: Read a CSV file and plot a graph
Date: Mon, 4 Jun 2018 20:04:40 +0200

2018-06-04 18:08 GMT+02:00 Ron.Simonson <address@hidden>:
> On 06/04/2018 07:18 AM, Renato S. Yamane wrote:
>> Please, is there an way to read a CSV file and split it to plot 2
>> graphics?
>>
>> ===== This is the conntent of the CSV file =====
>> Graph A
>> displacement,weight
>> 0, 0
>> 1, 20
>> 2, 40
>> 3, 60
>> 4, 80
>> 5, 100
>> Graph B
>> displacement,weight
>> 0, 0
>> 1, 15
>> 2, 30
>> 3, 45
>> 4, 60
>> 5, 75
>> ==================================================
>>
>> I looking for a way to make 2 graphs (A e B) with the datas that is
>> available in a single file...
>
>
> Perhaps this will get you started.  I generally put a '#' comment
> character at the begging of comment lines as shown in the example
> data file.  Then it is easy to use the .m file shown here to do
> something close to what you are asking for.  There are certainly
> methods within octave to read files line by line and decipher what
> each line contains but the attached is simple, and quick so this
> is what I will often do.
>
> Others will undoubtedly provide you with much better solutions
> but hopefully this will get you started.


Very interesting way to skip the headers!!
Thank you for this amazing tip...

Regards,
Renato



reply via email to

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