As others have pointed out, i is already assigned the value you want by default.
But assuming it weren't, the proper way to assign the value would be:
The error is basically telling you that Matlab won't implictly do any algebra for you... you can only assign a value to a variable, not to a function or equation like you attempted to do.
2 Comments
Direct link to this comment
https://nl.mathworks.com/matlabcentral/answers/456790-i-got-the-expression-to-the-left-of-the-equals-sign-is-not-a-valid-target-for-an-assignment#comment_694890
Direct link to this comment
https://nl.mathworks.com/matlabcentral/answers/456790-i-got-the-expression-to-the-left-of-the-equals-sign-is-not-a-valid-target-for-an-assignment#comment_694890
Direct link to this comment
https://nl.mathworks.com/matlabcentral/answers/456790-i-got-the-expression-to-the-left-of-the-equals-sign-is-not-a-valid-target-for-an-assignment#comment_695211
Direct link to this comment
https://nl.mathworks.com/matlabcentral/answers/456790-i-got-the-expression-to-the-left-of-the-equals-sign-is-not-a-valid-target-for-an-assignment#comment_695211
Sign in to comment.