How to convert a cell array containing various non-linear equations to an inline function ?

I am storing multiple equations in a cell array with unknown variables. I want to convert the elements (equations) in this cell array to inline functions in order to evaluate them at a set of points

3 件のコメント

the cyclist
the cyclist 2014 年 11 月 6 日
Can you give a small example of what you mean by " ... multiple equations in a cell array with unknown variables".
Ahsun Ali
Ahsun Ali 2014 年 11 月 7 日
F is a cell array containing two equations(as an example) f1=4*x^2-20*x+1/4*(y^2)+8 and f2=1/2*(x*y^2)+2*x-5*y+8. When i try to do F=inline(F) matlab gives an error 'Input must be a string' but i'm already taking the input as F{counter1}=input('Enter the equation:','s'); i'm taking in eq's in a loop so I have linked the location of array storage to the value of counter
Ahsun Ali
Ahsun Ali 2014 年 11 月 7 日
I want to find the value of should be function array F at a specific value of 'x' and 'y' (in this case). If there were more eq's then the variables would be more as well equal to the number of eq's that is

サインインしてコメントする。

回答 (1 件)

カテゴリ

ヘルプ センター および File ExchangeFunction Creation についてさらに検索

タグ

質問済み:

2014 年 11 月 6 日

回答済み:

2022 年 7 月 27 日

Community Treasure Hunt

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

Start Hunting!

Translated by