Try it online!Verify all programs online!
Explanation:
It was actually a bit hard to keep this at 196 bytes, since there are many bytes that are now mandatory on each line.
The first line is simply a scalar that's not outputted, followed by a comment. The second line is an anonymous function that takes a string x
as input and makes the following operations:
strsplit(x,char(10)) % Split at newlines. Can't use a literal newline, or [10,''] due to previous rules
cellfun(@(C) ... ) % Perform the following operation on each line:
any(C==' ') % Make sure there is at least one tab character
1&&find(C==' ')>1 % Make sure the index is higher than 1
1&&cellfun( ... ) % Check that this is true for all lines.
It's lucky that the short circuit operation &&
takes precedence over &
, and that 1&&find
doesn't require parentheses. Otherwise I wouldn't manage to golf this down to 196 bytes.