How do you put the function y=xcos(X+0.2) into MATLAB? We need to put in to find x=-4 and x=4 to find the local minimums. We are using an example from a textbook.

조회 수: 4 (최근 30일)
>> func _ _y = x.*cos (x+0.3) Undefined function or variable 'func'.

답변 (1개)

John D'Errico
John D'Errico 2018년 11월 1일
You were close.
func = @(x) x.*cos(x +0.2);

카테고리

Help CenterFile Exchange에서 Fourier Analysis and Filtering에 대해 자세히 알아보기

태그

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by