3/17/2018
Posted by 

You have a couple of options. Option #1: Automatically generate a function If you have of the you can convert a symbolic expression to an anonymous function or a function M-file using the function. An example from the documentation: >>syms x y >>r = sqrt(x^2 + y^2); >>ht = matlabFunction(sin(r)/r) ht = @(x,y)sin(sqrt(x. Final Fantasy Viii Steam Edition Ita Download there. ^2+y.^2)).*1./sqrt(x.^2+y.^2) Option #2: Generate a function by hand Since you've already written a set of symbolic equations, you can simply cut and paste part of that code into a function. Here's what your above example would look like: function output = f(beta,n1,n2,m,aa) u = sqrt(n2-beta.^2); w = sqrt(beta.^2-n1); a = tan(u)./w+tanh(w)./u; b = tanh(u)./w; output = (a+b).*cos(aa.*u+m.*pi)+(a-b).*sin(aa.*u+m.*pi); end When calling this function f you have to input the values of beta and the 4 constants and it will return the result of evaluating your main expression. NOTE: Since you also mentioned wanting to find zeroes of f, you could try using the function on your symbolic equation: zeroValues = solve(f,'beta'). Someone has tagged this question with Matlab so I'll assume that you are concerned with solving the equation with Matlab. If you have a copy of the Matlab Symbolic toolbox you should be able to solve it directly as a previous respondent has suggested.

Download Matlab Toolbox SymbolicallyMatlab Toolbox List

Download Matlab Toolbox Symbolically Meaning. Is also interdisciplinary, which means it relates to many different fields. Now you know the aspects of computer. Best Craagle Free Download Full 2016 - Free And Software. Learn about the Symbolic Math Toolbox key features. Compute derivatives, integrals, and Fourier transforms symbolically using familiar MATLAB syntax.

If not, then I suggest you write a Matlab m-file to evaluate your function f(). The pseudo-code you're already written will translate almost directly into lines of Matlab. As I read it your function f() is a function only of the variable beta since you indicate that n1,n2,m and a are all constants. I suggest that you plot the values of f(beta) for a range of values.

The graph will indicate where the 0s of the function are and you can easily code up a bisection or similar algorithm to give you their values to your desired degree of accuracy. If you broad intention is to have numeric values of certain symbolic expressions you have, for example, you have a larger program that generates symbolic expressions and you want to use these expression for numeric purposes, you can simply evaluate them using 'eval'.

If their parameters have numeric values in the workspace, just use eval on your expression. For example, syms beta%n1,n2,m,aa= Constants% values to exemplify n1 = 1; n2 = 3; m = 1; aa = 5; u = sqrt(n2-beta^2); w = sqrt(beta^2-n1); a = tan(u)/w+tanh(w)/u; b = tanh(u)/w; f = (a+b)*cos(aa*u+m*pi)+a-b*sin(aa*u+m*pi);%# The main expression If beta has a value beta = 1.5; eval(beta) This will calculate the value of f for a particular beta. Using it as a function. This solution will suit you in the scenario of using automatically generated symbolic expressions and will be interesting for fast testing with them. If you are writing a program to find zeros, it will be enough using eval(f) when you have to evaluate the function. When using a Matlab function to find zeros using anonymous function will be better, but you can also wrap the eval(f) inside a m-file.