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 CenterFile Exchange에서 Logical에 대해 자세히 알아보기

태그

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by