Message Boards Message Boards


Questions regarding a list error

Posted 9 years ago
1 Reply
0 Total Likes

Hi All, I have recently been working on a new project and I am not sure where the error is coming from. I have read in a csv file with four columns separated by three commas. The first column consists of dates in the form of 10/11/14. What I would like to do here is create a second list which in its first column has 1s and 2s depending on whether or not the month is between May and September or November and April. I am getting an error when I do this that I can't resolve. The issue is attached. Thanks much for any help. Code

POSTED BY: Drew Clark

Reading data into solardata it should probably read as

For[i=1, i < n + 1, i++, If [StringTake[ToString[solardata[i][i],2]<4, a[i][1] = 1, a[i][1]=2]]

your construct a from solardata, not a from a itself.

POSTED BY: Udo Krause
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract