basic questions how to find x

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 ExchangeSymbolic Math Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by