Wed 30 Sep 2015 03:47:25 PM UTC, original submission:
If the 'headerlines' property is used as an argument to the textscan() function, and the value of 'headerlines' is 0, a warning is created:
(This may be the case if the "0" is actually a variable computed elsewhere in the code. The current workaround--having to check for a zero value, and subsequently call textscan() without the headerlines argument--seems inelegant).
The fix seems simple in textscan.m:
This will clear out the headerlines value during the subsequent call to strread (eliminating the warning), regardless of whether it's positive, negative, or zero.
|