Solving a system of linear equations; and, reducing the system.
4 views (last 30 days)
Show older comments
Hi,
I'm using matlab 2020a
I have 59 linear equations. Which overall include 89 variables. Normaly this is unsolvable if the number on unknowns is greater than the number of equations.
However, to find a variable for example h_n then only two of these equations are needed with a requirment of knowing 7 variables. Meaning that the other 57 equations and 82 other variables are not needed.
Is there a way for matlab to select the equations that are required to solve for a specifical variable when provided with only a few variables. Or in other words for matalab to use the reduce the system of linear equations to the required ones.
I will show some snippets of the code here as there are over 1000 lines of code here.
syms SM h h_n h_ac_wb C_L_wb_a h_t S_t S C_L_t_a eps_a ...
The equation are:
StS.eq1 = (2*W)/(rho*S*(v^2)) == C_L;
StS.eq2 = C_M_0 + C_M_a*a_a == C_M;
Where they continue to up to StS.eq59. For the above mentioned example with the inputted variables in syms only the 10th and 9th equiation would be needed. Where the two unknowns are h_n and S_t. Which can be solved by the "solve" function.
StS.eq10 = h_n-h == SM;
StS.eq9 = (h-h_ac_wb)*C_L_wb-(h_t-h)*(S_t/S)*(1-eps_a) == C_M_a;
So, is there any way for matlab to reduce the system of linear equation based on the inputted variables?
Thank you in advanced.
0 Comments
Answers (0)
See Also
Categories
Find more on Symbolic Math Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!