help-octave
[Top][All Lists]
Advanced

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

Re: How to compare the colums ( 2nd and 3rd) of 2 .csv files based on a


From: Ganesh Kini
Subject: Re: How to compare the colums ( 2nd and 3rd) of 2 .csv files based on a condition
Date: Wed, 24 Jun 2020 02:08:02 +0200

Yes I used 
data1 = textscan(file1, '%s,%f,%f,%d\n', 'HeaderLines', 1, 'Delimiter',',')

But again I want to get the difference between the 2nd and 3rd column based on condition and number. How do I map it and then compare the value?  

Eg: condition ta and  number 1 of the 4th row of file1 has to compare with  condition ta and  number 1 of the 1st row of file2 

How do I find the difference in this case? Please guide me 


On Wed, Jun 24, 2020 at 1:12 AM Nicholas Jankowski <jankowskin@asme.org> wrote:
On Tue, Jun 23, 2020 at 6:03 PM Ganesh Kini <ganeshrkini19@gmail.com> wrote:
I tried, but it reads only one row and not all the rows


I don't think it should matter on your system, but try:

data1 = textscan(file1, "%s,%f,%f,%d\r\n", "HeaderLines", 1, "Delimiter",",") 

certain text file formats require the extra line-end character. but that's usually only windows systems being MSDOS compatible.  the inputs/outputs i showed before were from the files you attached, so I'm not sure what else could be the issue. 

reply via email to

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