MATLAB: Error: Invalid expression. Check for missing multiplication operator, missing or unbalanced delimiters, or other syntax error. To construct matrices, use brackets instead of parentheses.

define columerror

i have a file named 2p23heart1. I try to define the first colum.
>> load 2p23-heart1
>> frequency = 2p23-heart1(:,1):
frequency = 2p23-heart1(:,1):
Error: Invalid expression. Check for missing multiplication operator, missing or unbalanced delimiters, or other
syntax error. To construct matrices, use brackets instead of parentheses.
i do not get why it gives me this error. Can you please help me out?

Best Answer

Variable names in MATLAB are not allowed to contain the - character. Nor are they allowed to start with a digit. See the documentation for the isvarname function for a list of other restrictions.