I am trying to ask the user for a function of x that can be used subsequently in the code. I tried to use str2func but that is throwing an error
str = input('Give a function to minimize in x: ','s') ; f = "@x" +str; %%str2func(['@x '.*str]) ; f = str2func(f); %...
environ 2 mois ago | 1 answer | 0