derivative at various points in symbolic math toolbox

2 visualizaciones (últimos 30 días)
Mesbahose Salekeen
Mesbahose Salekeen el 2 de Oct. de 2019
Respondida: Stephan el 2 de Oct. de 2019
let say i have a vector.
A=[1 2 4 6]
now i am declaring a function using symbolic toolbox
syms x
f=x^2
how do you evaluate f at every elements of A?

Respuesta aceptada

Stephan
Stephan el 2 de Oct. de 2019
A = [1 2 4 6];
syms x
f(x) = x^2
sol = f(A)
gives:
f(x) =
x^2
sol =
[ 1, 4, 16, 36]

Más respuestas (0)

Categorías

Más información sobre Symbolic Math Toolbox en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by