how can I pass an equation as input parameter to function
Mostrar comentarios más antiguos
I write s function which take two parameter the first is an equation and the second is an integer number and I want to substitute with this number in the equation and return the result.
function result=sub(a,c)
%UNTITLED3 Summary of this function goes here
% Detailed explanation goes here
result=subs(a,c);
end
when I test it on command window I write
>> result=sub(2*x,1)
I get an error
??? Undefined function or variable 'x'.
Respuestas (1)
Eman Ahmed Elsayed
el 31 de Mayo de 2011
5 votos
1 comentario
Ayesha Khan
el 11 de Mzo. de 2023
thanks
Categorías
Más información sobre Mathematics en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!