Invalid use of operator. error, dont know what to change to fix it.

2 ビュー (過去 30 日間)
Connor
Connor 2023 年 1 月 27 日
コメント済み: Connor 2023 年 1 月 27 日
The function I have to plug into is
I keep getting the error:
File: solution.m Line: 5 Column: 22
Invalid use of operator.
(Line: 5 is f =)
Im not sure what to change to fix the error.
x = linspace(0,5,1000);
f = (x.*x)*exp(-x.)

採用された回答

Torsten
Torsten 2023 年 1 月 27 日
移動済み: Torsten 2023 年 1 月 27 日
Elementwise operations are .* ./ and .^
.) does not exist.
f = (x.^2).*exp(-x)

その他の回答 (0 件)

カテゴリ

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

タグ

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by