How to Solve Simultaneous Equations in MatLAB Using linsolve and solve

แชร์
ฝัง
  • เผยแพร่เมื่อ 29 พ.ย. 2024

ความคิดเห็น • 28

  • @mariajaen1795
    @mariajaen1795 4 ปีที่แล้ว +2

    you helped me isolate the acceleration of an angle in a very complex dynamic equation of motion, thanks

  • @BibhutiBBhardwaj
    @BibhutiBBhardwaj 2 ปีที่แล้ว +1

    Hi, I need to solve a set of linear equations (3 variables) in such a way that any negative solution is taken as zero (Constraint). e.g. if x=45, y=12, z= -0.12 then z=0 and x and y will readjusted accordingly. How to do that?

  • @newhobby206
    @newhobby206 3 ปีที่แล้ว +2

    Thanks for the video.Hello sir, how can we solve for the four variables?

    • @KindsonTheGenius
      @KindsonTheGenius  3 ปีที่แล้ว

      Same approach. I would make a lesson on System of equations and do subscribe to get notified 😋

  • @kirilllove6967
    @kirilllove6967 2 ปีที่แล้ว

    Good information👏

  • @rohanraj5845
    @rohanraj5845 3 ปีที่แล้ว +1

    Hi..I wanted to know if there is a way to solve a system of linear equations with unknown constants as coefficients.Any input would be really appreciated.Thanks in advance

    • @KindsonTheGenius
      @KindsonTheGenius  3 ปีที่แล้ว

      A normal equation looks like this 2x + 3y = 5 and we have to solve for unknown variables x and y. Now if you have unknown coefficients as well, say ax + by = 5, how do we solve for unknown coefficients a and b, then solve for unknown variables x and y? Or do you mean something else? Can you clarify

    • @rohanraj5845
      @rohanraj5845 3 ปีที่แล้ว

      @@KindsonTheGenius what I mean is suppose we have a set of linear equations of the form a1x +b1y+c1z=d1,a2x +b2y+c2z=d1,a3x +b3y+c3z=d1
      I want to solve unknown variables x,y,z in terms of constants a1,a2,a3,b1,b2,b3..and so on

  • @zynxajeaesthetics6067
    @zynxajeaesthetics6067 4 ปีที่แล้ว +1

    thanks alooot bro

  • @expertpkr4077
    @expertpkr4077 4 ปีที่แล้ว +3

    I want to solve linear equation of three variable ,please make a video ,I subscribe you

    • @KindsonTheGenius
      @KindsonTheGenius  4 ปีที่แล้ว +2

      Sure I'll make this... this is interesting too!

  • @chausdenisemmanuel5868
    @chausdenisemmanuel5868 3 ปีที่แล้ว +1

    matlab solution f(x)=3cos(1.7x)e 0.3x 2sin(1.4x)e0.3x for- 7

    • @chputriw
      @chputriw 2 ปีที่แล้ว

      hello, have you solved that problem?
      I also need to solve simultaneous calculations with trigonometry equation

  • @tshokelo1219
    @tshokelo1219 5 ปีที่แล้ว +1

    Why don't you just use that back slash operation (i.e. A\B)? ... Solvable in 1 line

    • @alihameed9469
      @alihameed9469 5 ปีที่แล้ว

      hi sir may i know how i can get the value and use it in another equation.i mean if i have x=3y+9 this equation 1 and y=-3x+7 this equation 2 so i wanna know the value of the x and y also use it in other way to determine something else. can you pleas help me :)

    • @tshokelo1219
      @tshokelo1219 5 ปีที่แล้ว +1

      @@alihameed9469 let sol=a\b; then x=sol(1) and y=sol(2)
      I'm not sure if I understood the question correctly but i hope that's what you're looking for

    • @alihameed9469
      @alihameed9469 5 ปีที่แล้ว +2

      @@tshokelo1219
      yeah sir its working ,thank u so mush. and here i put the full code for anyone looking for it.
      %{
      ax+by=c....equ(1)
      dx+ey=f....equ(2)
      A=[a b;d e]
      B=[c f]
      sol=A/B
      x=sol(1)
      y=sol(2)
      example
      3x-9y=-42....equ(1)
      2x+4y=2......equ(2)
      %}
      A = [3 -9;2 4]
      b = [-42;2]
      %Solve Ax=b as A\b
      sol=A\b;
      x=sol(1)
      y=sol(2)

  • @fouzilaissani13
    @fouzilaissani13 4 ปีที่แล้ว

    i cant convert the equations into matrices with equations to matrices function

  • @mohammadjaji6773
    @mohammadjaji6773 5 ปีที่แล้ว +1

    is it possible to print both solutions x and y at the same time usingthe solve method

    • @tonyawhitehead7460
      @tonyawhitehead7460 5 ปีที่แล้ว

      Yes - just put multiple output arguments i.e. [xSol, ySol] = solve([equ1, equ2],[x,y])

  • @esa6321
    @esa6321 2 ปีที่แล้ว

    This helped save my marriage

  • @niyazkhan1207
    @niyazkhan1207 4 ปีที่แล้ว +1

    Hello

  • @darpan_iitk
    @darpan_iitk 4 ปีที่แล้ว

    Write a computer program for solving a system of linear equations Ax=b. The program should have the following features:
    Input: The program should read the following inputs
    (i) the number of equations (n),
    (ii) elements of the coefficient matrix, and
    (iii) elements of the forcing vector
    Options: The user should have the option of selecting one of the following methods-
    a. GE (with scaling and pivoting)
    b. LU decomposition by using GE (without pivoting)
    c. LU decomposition by using GE (with pivoting)
    d. Cholesky decomposition (for symmetric positive definite matrix)
    Output: The output from the program should be written in a text file. This file should contain
    the following results for different methods-
    a. GE: the unknowns x, the permutation matrix (if pivoting is done), and the elements of U
    b. LU by GE: the unknowns x, the permutation matrix (if pivoting is done), and the elements of L and U, and inverse of A using LU
    c. Cholesky decomposition: the unknowns x and the elements of Cholesky factor, LC
    Note:
    The first line of your code must contain the language of your choice among python and octave as:
    Write a computer program for solving a system of linear equations Ax=b. The program should have the following features:
    Input: The program should read the following inputs
    (i) the number of equations (n),
    (ii) elements of the coefficient matrix, and
    (iii) elements of the forcing vector
    Options: The user should have the option of selecting one of the following methods-
    a. GE (with scaling and pivoting)
    b. LU decomposition by using GE (without pivoting)
    c. LU decomposition by using GE (with pivoting)
    d. Cholesky decomposition (for symmetric positive definite matrix)
    Output: The output from the program should be written in a text file. This file should contain
    the following results for different methods-
    a. GE: the unknowns x, the permutation matrix (if pivoting is done), and the elements of U
    b. LU by GE: the unknowns x, the permutation matrix (if pivoting is done), and the elements of L and U, and inverse of A using LU
    c. Cholesky decomposition: the unknowns x and the elements of Cholesky factor, LC
    Note:
    The first line of your code must contain the language of your choice among python and octave as:
    anyone post the code of above program please.