Creating a symbolic variable, then using it as a real variable
Show older comments
I need my program to calculate the derivative of a function, and as far as I understand that means I need to make a symbolic variable. How then can I continue to use that variable as a real vector?
This is what I have tried:
syms x
y = input('Please enter a valid function of x')
deriv = diff(y)
syms clear
x = 0:pi/30:pi;
plot(x,y)
Accepted Answer
More Answers (1)
Categories
Find more on Symbolic Math Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!