MATLAB Answers

0

derivative at various points in symbolic math toolbox

Asked by Mesbahose Salekeen on 2 Oct 2019
Latest activity Answered by Stephan
on 2 Oct 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?

  0 Comments

Sign in to comment.

1 Answer

Answer by Stephan
on 2 Oct 2019
 Accepted Answer

A = [1 2 4 6];
syms x
f(x) = x^2
sol = f(A)
gives:
f(x) =
x^2
sol =
[ 1, 4, 16, 36]

  0 Comments

Sign in to comment.