hello
if i have a function y=f(x) and x is given. What function do I use to calculte the corresponding y?
- symbolical - numerical
example: y=5x+2 and x=2 question give y? thanks

 채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2013년 6월 23일
편집: Azzi Abdelmalek 2013년 6월 23일

1 개 추천

y=@(x) 5*x+2
y(2)

추가 답변 (1개)

Amir Ghasemiyan
Amir Ghasemiyan 2013년 6월 24일

0 개 추천

and this is another way:
function y=y(x)
y=5*x+2;
and in command window:
y(2)

카테고리

도움말 센터 및 File Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by