how to solve simultaneous equations?
251 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Dear sir/madam,
I need to solve two simultaneous linear equations. How could I do this in matlab? Looking forward to hearing from you soon.
Thanking you, BSD
1 Commento
MUYIDEEN MOMOH
il 24 Mar 2019
Question
3x+2y=12
4x+6y=18
Matlab code
A=[3, 2 ; 4, 6];
B=[12; 18];
sol=linsolve(A,B)
Risposta accettata
Più risposte (4)
Mu-izz Gbadamosi
il 10 Nov 2017
(x-(cos(alpha1)*(la*cos(theta1)+R)))^2 + (y-(-(R+la*cos(theta1))*sin(alpha1)))^2 + (z-(-la*sin(theta1)))^2 =lb^2; (x-(cos(alpha2)*(la*cos(theta2)+R)))^2 + (y-(-(R+la*cos(theta2))*sin(alpha2)))^2 + (z-(-la*sin(theta2)))^2 =lb^2; (x-(cos(alpha2)*(la*cos(theta3)+R)))^2 + (y-(-(R+la*cos(theta3))*sin(alpha2)))^2 + (z-(-la*sin(theta3)))^2=lb^2;
0 Commenti
KELVIN
il 5 Giu 2023
Modificato: KELVIN
il 5 Giu 2023
Step 1: Express your equations into an Augmented Matrix where each equation represents a row of that matrix (excluding the answers/ the value beyond "=" sign.), assign the matrix to a variable. Let say A.
Step 2: Form a column matrix of the answers/ values beyond the "=" sign. Assign the column matrix to another variable B.
Step 3: Compute the solution by 'linsolve()' function OR sipmly A\B=inverse(A)*B
Solution=linsolve(A,B)
0 Commenti
Vedere anche
Categorie
Scopri di più su Operating on Diagonal Matrices in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!