Is there an alternate for sym function in matlab 2012b?

I can't find symbolic math toolbox at all in this version. Is there any other function which serves the same purpose or can anyone tell me how to construct your own sym function as the last resort?

Answers (1)

sym is part of the Symbolic Toolbox, which must be purchased separately for all R2012b licenses.
It is possible that previously you were working with Student Version licenses, which include the Symbolic Toolbox as part of the package. Student Version is not available for R2012b. All Student Version releases in releases named after years have been for the "a" (beginning of year) releases, with the exception of R2008b.
If you do not have "sym" then you are also missing the rest of the Symbolic Toolbox. "sym" is of no value without that toolbox, but in order for us to suggest an appropriate replacement we would need to know what kinds of symbolic operations you need to do.
If you happen to have a full Maple release that dates from roughly 2006 or later, then it is possible to install a linkage between MATLAB and Maple so that "sym" in MATLAB will create Maple objects. The capacities of that MATLAB / Maple interface are a bit different than the MATLAB Symbolic Toolbox; a fair number of operations will respond nearly the same, but the interface is closer to what MuPAD was like before R2011b.
If you are doing integer computations in extended precision then John D'Errico's FEX contribution "vpi" might be usable.

5 Comments

Ok...this is the part of code where i am creating a symbolic function f with inputs x,y,z which in each iteration is partially differentiated wrt each of the symbols x,y,z and then takes values of current x,y,z after which it becomes an elemnt of matrix A as defined by code. myfunction 1,2,3 are the calling function which does this partial diff. wrt. each of the symbols.
Now, can it be done without defining f as a symbolic function? Also, since i am an intern with a company, so the student version matlab is out of question. so, please suggest somthing feasible. Thankyou!
syms x y z
f = sym(zeros(10000,1));
for p = 1:10000
f(p,1) = x * sin((2*3.14*y*(p/10000000)) + z); % defining estimate signal
end
n =[a b c];
n1 = n.';
m = [4 50000 0];
m1 = m.';
while gt(double(m1(2,1)),100.5) % while loop for conversion
A = sym(zeros(10000,1)); % defining matrix A
A(:,1) = subs(myfunction1,[x,y,z],[n1(1,1),n1(2,1),n1(3,1)]); % differentiating and putting values in each element of A
A(:,2) = subs(myfunction2,[x,y,z],[n1(1,1),n1(2,1),n1(3,1)]);
A(:,3) = subs(myfunction3,[x,y,z],[n1(1,1),n1(2,1),n1(3,1)]);
To confirm: myfunction1, myfunction2, myfunction3 are all symbolic formula and are passed as parameters to this section of code? If so then please describe the code that creates those symbolic formula: in particular, is there a point at which user input controls the form of the formula ? For example can the user input 'x^2+5*y' and have that be the formula? Or can the user input a value which is used to control the number of terms of a fixed formula that will be used?
John's hpf rather than vpi.
For integers, vpi is the appropriate. For what is being done here in this question, neither vpi nor hpf are suitable.
myfunction1 looks like this.... function r1 = myfunction1(x,y,z) %syms x y z f = zeros(10000,1); for q1 = 1:10000 f(q1,1) = x * sin((2*3.14*y*(q1/10000000)) + z); end
r1 = diff(f,x);
end
similar is the case for myfunction2 and 3 except for the fact that they are diffrentiated wrt y and z. Now, value of x,y and z is passed to this function in every iteration as described in the main programme above. The problem is, either i have to include the line "syms x,y,z" or it says "undefined input arg. x,y,z". Need an alternate for syms.

Sign in to comment.

Asked:

on 24 May 2013

Community Treasure Hunt

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

Start Hunting!