I'm trying to do
F_diff_x = matlabFunction(diff(sym(f), 'x'));
when f is
f = get(handles.equation,'String');
And sometimes I can calculate the derivative, sometimes not Becouse I get:
??? Error using ==> sym.sym>convertExpression at 2515 Error: 'expression' expected [line 1, col 12]Error in ==> sym.sym>convertChar at 2426 s = convertExpression(x);Error in ==> sym.sym>convertCharWithOption at 2410 s = convertChar(x);Error in ==> sym.sym>tomupad at 2164 S = convertCharWithOption(x,a);Error in ==> sym.sym>sym.sym at 111 S.s = tomupad(x,'');Error in ==> moo>bc_Callback at 383F_diff_x = matlabFunction(diff(sym(f), 'x'));
How can I do this in a different way?
Best Answer