how to evaluate symbolic functions in matlab?

1 view (last 30 days)
Example I have x=[1,1]; how can I evaluate Displacement1 by value x? Note: in my problem x can be varied to x(n). I try to use command 'subs', but it is not convenient because I have to change every time when x varied to x(n). thank you very much for all your commends.
Displacement1 = [ 0, -(9*x(2) + 18*2^(1/2)*x(1))/(25*x(1)*x(2)), 0]
  2 Comments
Walter Roberson
Walter Roberson on 28 Jan 2016
Could you give an example of when x should be varied to x(n) ?
Chan Heng
Chan Heng on 28 Jan 2016
Edited: Walter Roberson on 28 Jan 2016
Example:
Displacement1=[0, (4*L*P*x(1)*x(2)*x(3)*x(4)*x(5) + L*P*x(1)*x(4)*x(5)*x(6) + 2*L*P*x(2)*x(4)*x(5)*x(6) + 2*2^(1/2)*L*P*x(1)*x(2)*x(4)*x(6) + 2*2^(1/2)*L*P*x(1)*x(2)*x(5)*x(6))/(Ee*x(1)*x(2)*x(4)*x(5)*x(6)), 0]
in here I have n=6,so we want to evaluate the function Displacement1 by value x=[1,1,1,1,1,1]. thank you very much for your comment.

Sign in to comment.

Answers (0)

Categories

Find more on Symbolic Math Toolbox in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!