Now we have all the tools necessary to look at limits in Matlab. = 1/X for 5 equally spaces points between 2 and 6. Suppose you want to know the values of the function f(X) You can also see the result of a function for a series of values. Third input is what you want to substitute for. The second input lists the variables that we want to substitute. In our case, the function was stored in the symbolic variableį. So, what is going on? Basically, subs requires 3 inputs. Now, you can evaluate F for a=5 and x=pi/2 by using the command subs which stands for 'substitute.' This creates a symbolic function F(a,x) = a sin(x). Now, we can create a function F = a*sin(x) Will create two symbolic variables a and x. To assign a symbolic variable, you just have to use the command syms. This poses an interesting question, "How do you store a functionį(x) and continue to input different values in Matlab?" In order to do this, you have to invoke the symbolic toolbox in Matlab. We change our x-values, we would have to redefine our y-values. Upto this point, we have learned how to plot general functions in Matlab. So, of course we want to learn how to calculate limits using Matlab. In class, we are learning how to calculate limits.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |