The lines
msg = cell2mat ( strcat ('Lacking sufficient data in ' ,{' '},
filename ;', data avaliable for period ’ ,{' '}, datestr ( date (1)) ,{'
- '}, datestr ( date ( length ( date )))));
need to be written all as one line, or you need to use the ... continuation marker.
msg = cell2mat ( strcat ('Lacking sufficient data in ' ,{' '}, filename ;', data avaliable for period ’ ,{' '}, datestr ( date (1)) ,{' - '}, datestr ( date ( length ( date )))));
Also, you cannot use semi-colon at that point, as you are not within [] .
Furthermore, if you look very carefully at the character after "for period" it is ’ which is char(8217) which is Right Single Quotation, where you need ' instead. Putting these together, you get
msg = cell2mat ( strcat ('Lacking sufficient data in ' ,{' '}, filename ,', data available for period ' ,{' '}, datestr ( date (1)) ,{' - '}, datestr ( date ( length ( date )))));
Best Answer