0

I have the below For loop to generate Histograms for 16 values in my dataset but I have no historgam showing. What may I be doing wrong?

 For[i = 1, i < 17, i++,
  mycnr = StringJoin["CNR", ToString[i]];
  cnr[i] = newDataSet[All, mycnr];
  Histogram[cnr[i]]]

when I comment out lines 3 and 4 inside for loop to see the outcome of the StringJoin function, I do not see the mycnr simply showing the CNR1 to CNR16 I expect from such StringJoin

I apologize, I am new at Mathematica, so "be gentle" :-)

Edmund
  • 42,267
  • 3
  • 51
  • 143
wlnwtz28
  • 1
  • 2

1 Answers1

-1

I simplified it and finally got it to work:

For[i = 1, i < 17, i++, 
  Histogram[newDataSet[All, StringJoin["CNR", ToString[i]]]]
];
MarcoB
  • 67,153
  • 18
  • 91
  • 189
wlnwtz28
  • 1
  • 2