How can I input values through variables in a multi-variable equation

5 ビュー (過去 30 日間)
Syed Jamal
Syed Jamal 2018 年 3 月 9 日
回答済み: Ahmet Cecen 2018 年 3 月 9 日
I have an equation: f(t,w) = w - t^(2) +1
1. I want to have user input the equation in terms of w and t
2. I have 5 values of each w(i) and t(i), I want to be able to put these values in the equation f(t,w) and obtain the result in a variable, lets say A, i.e. A=f(t,w) meaning that A = w - t^(2) + 1
_ * Problem is that I am confused about the syntax and script code that should be able to do this.*_

回答 (1 件)

Ahmet Cecen
Ahmet Cecen 2018 年 3 月 9 日
This should help: Anonymous Functions

カテゴリ

Help Center および File ExchangeOrdinary Differential Equations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by