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 17:38:02 +0200

Hi Nicholas,
>> data1{1}
ans =
{
  [1,1] = tb
  [2,1] = tb
  [3,1] = tb
  [4,1] = ta
  [5,1] = ta
  [6,1] = tc
  [7,1] = tc
  [8,1] = tc
}

>> class(data1{1})
ans = cell

 condition1 = cell2mat(data1{1})

Now I am getting the same output



On Wed, Jun 24, 2020 at 5:21 PM Nicholas Jankowski <jankowskin@asme.org> wrote:
On Wed, Jun 24, 2020 at 9:20 AM Ganesh Kini <ganeshrkini19@gmail.com> wrote:
Again, please stop top-posting your replies -- I click on the latest email and then click on reply all.

In Gmail, when you Reply All, you will see 'three dots'. Click those to see the email reply chain. then you can trim and interleave/bottom post accordingly. Gmail admittedly does not make bottom posting as easy as it could.

image.png


Because I don't have access on octave to post directly. I have requested earlier but no responseimage.png


That is not the access request for posting, that's the access request for administering the mailing list.  There is no 'access on octave to post directly', although some of the archives like Nabble will emulate a direct post by sending an email to the list on your behalf.  Best to just learn to use Gmail.

 
So for the answer of data1 

data1 = textscan (file1, "%s,%f,%f,%d \n" , "HeaderLines" , 1, "Delimiter" , "," )
>> data1
data1 =
{
  [1,1] =
  {
    [1,1] = tb
    [2,1] = tb
    [3,1] = tb
    [4,1] = ta
    [5,1] = ta
    [6,1] = tc
    [7,1] = tc
    [8,1] = tc
  }

  [1,2] =

     1.070000
     0.070000
     1.170000
     1.270000
     1.370000
     1.470000
     1.470000
     1.670000

  [1,3] =

    -1.1100
    -1.2300
    -1.6700
    -1.5700
    -1.3700
    -1.0700
    -1.4700
    -3.9700

  [1,4] =

    1
    2
    3
    1
    2
    1
    2
    3

}

that's the exact output I get for data1.  

What about for data1{1}?  

What do you get from class(data1{1})? 

condition1 = cell2mat(data1{1})

gives me:
>> condition1 = cell2mat(data1{1})
condition1 =

tb
tb
tb
ta
ta
tc
tc
tc


reply via email to

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