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

4 ビュー (過去 30 日間)
Muhammad Naveed Iqbal
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
please tell me the problem
code:
syms x
S=int(sin(cos(x)), x = 0..1)

回答 (2 件)

David Sanchez
David Sanchez 2015 年 6 月 10 日
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 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 件のコメント
Chris Rogers
Chris Rogers 2017 年 4 月 12 日
This gives me the error "Cannot integrate with respect to '0'. The integration variable must be a symbolic variable."

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeAssumptions についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by