I am trying simple eval function . But at some times it gets executed fine. Sometimes it gives me the error msg "Error: Unexpected MATLAB expression". Here's the eval function code. I hope i got the syntax correctly. collection is a character array = 'hero','zero','horse','cow'
collection = regexprep(collection,' ',''',''');eval(['words = {''',collection,'''};']);
Best Answer