MATLAB Answers

The expression to the left of the equals sign is not a valid target for an assignment.

4 views (last 30 days)
Muhammad Naveed Iqbal
Muhammad Naveed Iqbal on 10 Jun 2015
Commented: Chris Rogers on 12 Apr 2017
I wrote the following code for definite integral but it give the statement
The expression to the left of the equals sign is not a valid target for an assignment
please tell me the problem
code:
syms x
S=int(sin(cos(x)), x = 0..1)

Answers (2)

David Sanchez
David Sanchez on 10 Jun 2015
You are using the notation used by
numeric::int
instead of that to
int
Take a look at their differences in the documentation: they might seems the same, but they are not.
doc numeric::int
doc int

Titus Edelhofer
Titus Edelhofer on 10 Jun 2015
Hi,
that's the maple notation. Use the following:
syms x
S=int(sin(cos(x)), x, 0, 1)
Then it should work, although there is no (symbolic) solution to this ...
Titus

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!