Create Index variable name for entering n variables names

조회 수: 1 (최근 30일)
shadman khan
shadman khan 2018년 7월 11일
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