basic questions how to find x

1 次查看(过去 30 天)
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
y=@(x) 5*x+2
y(2)

更多回答(1 个)

Amir Ghasemiyan
Amir Ghasemiyan 2013-6-24
and this is another way:
function y=y(x)
y=5*x+2;
and in command window:
y(2)

类别

Help CenterFile 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