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

5 次查看(过去 30 天)
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 CenterFile Exchange 中查找有关 Get Started with MATLAB 的更多信息

标签

产品


版本

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by