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

조회 수: 2(최근 30일)
Muhammad Naveed Iqbal 2015년 6월 10일
댓글: Chris Rogers 2017년 4월 12일
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
code:
syms x
S=int(sin(cos(x)), x = 0..1)

댓글을 달려면 로그인하십시오.

### 답변(2개)

David Sanchez 2015년 6월 10일
You are using the notation used by
numeric::int
int
Take a look at their differences in the documentation: they might seems the same, but they are not.
doc numeric::int
doc int
##### 댓글 수: 0표시숨기기 이전 댓글 수: -1

댓글을 달려면 로그인하십시오.

Titus Edelhofer 2015년 6월 10일
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
##### 댓글 수: 2표시숨기기 이전 댓글 수: 1
Chris Rogers 2017년 4월 12일
This gives me the error "Cannot integrate with respect to '0'. The integration variable must be a symbolic variable."

댓글을 달려면 로그인하십시오.

### Community Treasure Hunt

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

Start Hunting!

Translated by