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

5 visualizaciones (últimos 30 días)
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.)

Respuesta aceptada

Torsten
Torsten el 27 de En. de 2023
Movida: Torsten el 27 de En. de 2023
Elementwise operations are .* ./ and .^
.) does not exist.
f = (x.^2).*exp(-x)

Más respuestas (0)

Categorías

Más información sobre Get Started with MATLAB en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by