Error using inline/subsref (line 14) Too many inputs to inline function.
Mostra commenti meno recenti
Greetings, my code run with error message of 'Error using inline/subsref (line 14) Too many inputs to inline function.'
This is where I used inline function.
df = vectorize(inline(get(handles.edit8,'String')))
f = vectorize(inline(get(handles.edit9,'String')))
When I run with the string of ' df(x,y) = 4.*exp(0.8.*x)-0.5.*y' and ' f(x) = (40.*exp(-x./2).*exp((13.*x)./10))./13 - (14.*exp(-x./2))./13', the code run perfectly.
However, when i run with this string ' df(x) = -2.*x.^3+12.*x.^2-20.*x+8.5' and 'f(x) = - x.^4./2 + 4.*x.^3 - 10.*x.^2 + (17.*x)./2 + 1', it has the error message.
Need help for this issue and it is very much appreciated! Thanks :)
Risposta accettata
Più risposte (1)
Star Strider
il 1 Dic 2016
1 voto
It is difficult to determine exactly what you are doing. Your inline function takes only one input, 'String', so you can only pass one argument to it in any one call to it.
Categorie
Scopri di più su Scope Variables and Generate Names in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!