How do you express this function in MATLAB syntax ?

์กฐํšŒ ์ˆ˜: 3 (์ตœ๊ทผ 30์ผ)
Emre Can Usengul
Emre Can Usengul 2020๋…„ 6์›” 9์ผ
๋Œ“๊ธ€: Walter Roberson 2020๋…„ 6์›” 9์ผ
๐‘“(๐‘ฅ) = e^x + sin(5x)
How do you express this function in MATLAB syntax ?

์ฑ„ํƒ๋œ ๋‹ต๋ณ€

KSSV
KSSV 2020๋…„ 6์›” 9์ผ
ํŽธ์ง‘: KSSV 2020๋…„ 6์›” 9์ผ
f = exp(x)+sin(5*x) ; % define x before
f = @(x) exp(x)+sin(5*x) ; % call by f(value) This is called Anonymous function
  ๋Œ“๊ธ€ ์ˆ˜: 5
KSSV
KSSV 2020๋…„ 6์›” 9์ผ
I gave comments...did you folllow those comments?
Walter Roberson
Walter Roberson 2020๋…„ 6์›” 9์ผ
f = exp(x)+sin(5*x) ;
would be an error if you had not defined x before.

๋Œ“๊ธ€์„ ๋‹ฌ๋ ค๋ฉด ๋กœ๊ทธ์ธํ•˜์‹ญ์‹œ์˜ค.

์ถ”๊ฐ€ ๋‹ต๋ณ€ (0๊ฐœ)

์นดํ…Œ๊ณ ๋ฆฌ

Help Center ๋ฐ File Exchange์—์„œ Annotations์— ๋Œ€ํ•ด ์ž์„ธํžˆ ์•Œ์•„๋ณด๊ธฐ

ํƒœ๊ทธ

์ œํ’ˆ

Community Treasure Hunt

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

Start Hunting!

Translated by