Create Index variable name for entering n variables names

2 次查看(过去 30 天)
I am solving highly non linear PDE system (2 variables 2 equations) (variables are Pg and Sg)
I applied finite difference--this gives variables with names like Pg(I+1), Pg(I-1), Pg(I) , Sg(I+1), Sg(I), Sg(I-1)
Now if you take 4 nodes this makes 8 variables (4 Pg and 4 Sg ) variables
Now since my equations are non linear, I have to apply newton Raphson method for system of equations
Now each Node eqn is treated as a non linear function, and evaluated at initial values
I cant write each equation; not possible using syms as : syms Sg1 Sg2 Sg3 Sg4 Pg1 Pg2 Pg3 Pg4 can help in solving 4 nodes but itss not possible when I use 100 nodes
I need an indexing way to create symbolic names syms Sg(I) AND ITERATE THEM FROM 1: 100 BUIT ITS NOT WORKING???
PLEASE HELP...SOMEONE...

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Calculus 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by