# Symbolic computation of nonlinear system of equations

3 views (last 30 days)

Show older comments

I have a nonlinear system of equations, and i would like to formulate the jacobian matrix in matlab symbolic tool box and then use the matlabfunction to convert the jacobian matrix to numerical matlab. The nonlinear equations are

from these equations a total of

defines the nonlinear equations. My matlab code gives error when I try to define the indexes j,k,and i. Below is my code

clear all;

close all;

clc

syms x k y beta theta chi i j

j=1:20

k=1:15

i=1:20

S(j)=symsum((x^k/y(k)*(beta(i)+1/5*(c+7))*chi*sin(theta)),k,1,10)

S(j)=symsum((x^k/y(k)*(beta(i)+1/5*(x^2*c+7))*chi*cos(theta)),k,1,10)

Thanks

##### 4 Comments

Walter Roberson
on 15 Sep 2016

### Accepted Answer

Walter Roberson
on 13 Sep 2016

The variable in symsum() cannot be used to index anything. You need to construct the vector of individual values and then sum() them.

For any individual k, how do you decide whether to add or subtract the 1/5* term? Or do you do both, thereby constructing 2^20 entries for Sj (all the possible combinations of plus and minus) ?

Your equations are for Sj but they do not involve j at any point: instead they use the undefined i .

I notice that both of your equations define Sj . Is the implication that the two Sj must equal each other?

### More Answers (0)

### See Also

### Community Treasure Hunt

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

Start Hunting!