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

2 Ansichten (letzte 30 Tage)
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.)

Akzeptierte Antwort

Torsten
Torsten am 27 Jan. 2023
Verschoben: Torsten am 27 Jan. 2023
Elementwise operations are .* ./ and .^
.) does not exist.
f = (x.^2).*exp(-x)

Weitere Antworten (0)

Tags

Produkte


Version

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by