How to calculate equation system in Matlab, with some knowns

In summary, to solve the equation F=Ku, where K is a [12x12] matrix, some members of u are zeros, and some members of F are known forces, you will need to have a good understanding of linear algebra, particularly Gaussian elimination or Cholesky decomposition. If you are studying finite element analysis, there are usually specific methods for solving this type of equation. However, if this is just a Matlab question, you can use the backslash operator (u = K \ F) to solve the equation. If you need to find specific variables such as A, B, C, D, M, N, and L, you will need to consult textbooks and have a good understanding of the parameters given in
  • #1
berdan
32
0
It's part of finite elements analysis.
All I need is to solve F=Ku,K is [12x12] matrix .
Some of the members of u are zeros ,some members of F are known forces . K is all known .
How do I solve F=Ku in that way ??

Thanks in advance.
 
Physics news on Phys.org
  • #2
It's not clear if your K matrix is for a single structure or is the stiffness matrix for one element.

In any event, if you haven't studied linear algebra, particularly things like Gaussian elimination or Cholesky decomposition, now will be a good time.

If you are studying finite element analysis, there is usually part of the course which is devoted to solving the system of equations and understanding the various methods.
 
  • #3
If this is just a Matlab question, then use u = K \ F. If it's a finite element question, you need to consult a few textbooks first.
 
  • #4
SteamKing said:
It's not clear if your K matrix is for a single structure or is the stiffness matrix for one element.

In any event, if you haven't studied linear algebra, particularly things like Gaussian elimination or Cholesky decomposition, now will be a good time.

If you are studying finite element analysis, there is usually part of the course which is devoted to solving the system of equations and understanding the various methods.

I studied Linear Algebra ,and that's overcomplicating things .
All I am asking : How do I solve in Matlab something like this :
[A] [1 0 1 0][M]
[V] [0 1 2 0][N]
[0]=EA/L [0 1 2 0][Q]
[D] [0 4 5 4][L]

Where I know some of the variables in the first matrix ,and I know some variables in the last matrix (in a form of parameter,lets say Q is known and given) .
I need to find A,B,C,D,M,N and L .
How do I do this in Matlab ?
 

1. How do I input equations into Matlab?

To input equations into Matlab, you can use the "syms" function to define symbolic variables, and then use the "solve" function to solve the equations.

2. How do I specify the known values in the equation system?

To specify known values in the equation system, you can use the "subs" function to substitute the known values for the symbolic variables in your equations.

3. Can I solve a system of equations with different numbers of unknowns?

Yes, Matlab is able to solve systems of equations with different numbers of unknowns. However, you may need to use additional functions, such as "linsolve" or "fsolve", depending on the complexity of the system.

4. How do I check the accuracy of my solution?

You can use the "subs" function again to substitute your solved values back into the original equations and see if they hold true. Additionally, you can use the "double" function to convert symbolic variables to numerical values for more accurate calculations.

5. Can I plot the solution of a system of equations in Matlab?

Yes, you can use the "ezplot" function to plot the solution of equations in Matlab. You can also use the "plot" function to plot individual equations or the "hold on" function to plot multiple equations on the same graph.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
32
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
7
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
938
  • MATLAB, Maple, Mathematica, LaTeX
Replies
6
Views
2K
Replies
3
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
6
Views
1K
Back
Top