basic questions how to find x

1 visualizzazione (ultimi 30 giorni)
Niels
Niels il 23 Giu 2013
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

Risposta accettata

Azzi Abdelmalek
Azzi Abdelmalek il 23 Giu 2013
Modificato: Azzi Abdelmalek il 23 Giu 2013
y=@(x) 5*x+2
y(2)

Più risposte (1)

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

Categorie

Scopri di più su Symbolic Math Toolbox in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by