PROBLEM BACKGROUND
Im writing a code for the Finite Volume method and at some point I have a set of equations with symbolic terms and their coefficients, for each cluster. A cluster being defined as the group of cells surrounding a given vertex.
i.e. 2a + 3b + 4c + 5d etc.
The set of equations is stored in a vector, i.e. call the equation above 'A' the vector,
[A
B
C
D]; etc
represent the system of equations for each cluster.
I am also working in unstructured meshes, therefore, the size of the cluster (number of cells attached to the vertex) can technically be any number. So the vector containing the set of equations can be any length depending on the cluster size. The number of symbolic terms and coefficients per equation is equal to the length of the vector containing the set of equations.
AIM
I need to extract the coefficients from each line and store them in a global matrix.
ISSUES
When using 'coeffs', the coefficients are stored in some order I cannot determine, i.e. they are not stored corresponding to how they are found in the equation (a,b,c,d), they are not stored in numerical order. So using 'coeffs' does gove me the correct coefficients, however, their connectivity to the global matrix is lost because I dont know how 'coeffs' orders its results.
I have tried looking for each symbolic term's coefficient ,using 'coeffs(A,a)' for example, but MATLab doesnt recognise the symbolic term 'a' in the function 'coeffs' even though it is defined previously as a symbolic term.
Thanks for any help offered
