'transform' text with inline into a mathematical function

I have to make a program that recieves many functions( like x^2) in the form of elements of a vector(b), and calculates the falue of each function on some points. So I have this
syms x;
for i=1:length(b);
b(i)=inline(b(i));
end
but it doesnt work

 Akzeptierte Antwort

Walter Roberson
Walter Roberson am 9 Jan. 2013

0 Stimmen

You would have to assign the output to a different array. And consider using matlabFunction()

Weitere Antworten (0)

Kategorien

Mehr zu Function Creation finden Sie in Hilfe-Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by