Having trouble finding a derivative

1 view (last 30 days)
Im fairly new to matlab and I keep getting the same error message.
When the following is entered: diff cot^2(sin theta)
I get:
Error using sym>convertExpression (line 2256) Conversion to 'sym' returned the MuPAD error: Error: Unexpected 'identifier'. [line 1, col 11]
Error in sym>convertChar (line 2167) s = convertExpression(x);
Error in sym>convertCharWithOption (line 2150) s = convertChar(x);
Error in sym>tomupad (line 1881) S = convertCharWithOption(x,a);
Error in sym (line 108) S.s = tomupad(x,'');
Error in char/diff (line 11) y = diff(sym(f),varargin{:});
Would appreciate any help or guidance thank you.

Accepted Answer

Walter Roberson
Walter Roberson on 12 Dec 2012
syms theta
diff( cot(sin(theta))^2, theta)
  3 Comments
Tam Ho
Tam Ho on 29 Dec 2017
I ran this code:
syms theta %create symbolic variable theta
assume(theta,'real') %theta is real
f = fit_v2; %calling our fitted polynomials
g = diff(f,theta);
g0=solve(g,theta);
double(g0);
I get this error:
Error in sym (line 215)
S.s = tomupad(x);
Error in sym/privResolveArgs (line 988)
argout{k} = sym(arg);
Error in sym/diff (line 21)
args = privResolveArgs(S,varargin{:});
Error in code (line 54)
g = diff(f,theta);

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!