error when calculating factorial
8 views (last 30 days)
I want to calculate all the combinations for a X number of variables and I am doing this code:
m=6;%number of variables
TC=TC+C; %total number of combinations
but I have the following error message from MATLAB:
Unbalanced or unexpected parenthesis or bracket.
Does anybody know which would be the right code to compute the total number of combinations, or where is the error in my code?
More Answers (1)
Ben11 on 12 Aug 2014
The error is due to a missing bracket at the end of this line:
Add a bracket and it works.