Solve Linear Equations with MATLAB

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

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

  • @avarchism
    @avarchism 4 ปีที่แล้ว +27

    You just saved me 20 points on an exam LOL, god bless

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

      Glad I could help!

  • @UFCDeityESP-ty9qp
    @UFCDeityESP-ty9qp 6 หลายเดือนก่อน +1

    8 years later & still awesome!

  • @folgee7368
    @folgee7368 4 ปีที่แล้ว +5

    Even 5 years later this was helpful for school, thank you good sir

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

    May God reward you for all your efforts and all the valuable information that you provide us smoothly .

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

    I have problems with right division. How could I solve:
    1.5a - 2b + c + 3d = 7.5
    3a + b - c + 4d = 16
    2a + 6b - 3c - d = 78
    5a + 2b + 4c - 2d = 71
    I know how to solve it using left division but don't know how to solve it using right one. Very appreciated the tip for using linsolve()! My professor says to not focus on the best-built in function for optimization, but I don't see a problem to show this things to beginners like me. That way I can know better practices for the future. Anyways, that's my question.
    Thanks and great video!

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

      Does this help? stackoverflow.com/questions/1007442/mrdivide-function-in-matlab-what-is-it-doing-and-how-can-i-do-it-in-python

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

    god bless you, i was having trouble finding how to solve a matrix with variables

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

    You can just use \ instead of multiplying by -1. The syntax is x=A\b; it is a more robust tool

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

      Thanks for the tip. Also linsolve can be even faster than A\b as shown here: www.mathworks.com/help/matlab/ref/linsolve.html I'll add both to the video description.

  • @Frank-cu9ur
    @Frank-cu9ur 5 ปีที่แล้ว +2

    This video helps me a lot! Thank you so much!

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

    Thank you for this wonderful and simple explanation

  • @peaceandlove11-h2b
    @peaceandlove11-h2b 2 ปีที่แล้ว +1

    how do you solve when there is X1 X2 X3

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

    hey can you tell me what might be code for a look up table in matlab

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

      Here is some documentation on lookup tables: www.mathworks.com/help/simulink/lookup-tables.html

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

      @@apm i meant the code.
      I think it's the link for working in Simulink!

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

      @@songshub7931 Here is a 1D lookup table in MATLAB: www.mathworks.com/help/simulink/slref/fixpt_interp1.html Search engines will help you find examples.

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

      @@apm ohkk thanx..can i connect with you for my project...i have to submit it in 2 weeks...i will be thankful to you if u will help me..ill share your channel on al my scial media.

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

      @@songshub7931 feel free to keep asking questions here in the comments. I generally don't have time to help with specifics of all the requests I receive each week but I'm glad to point to resources.

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

    thanks, it was really helpful

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

    How do you do this if your numbers are not integers

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

      It is the same method. Both integers and those with decimals work equally well.

  • @robinsibiya6710
    @robinsibiya6710 6 ปีที่แล้ว

    Let's consider the last example shown in this video, is it possible to calculate the uncertainty (accuracy) of Z if we find its value. Please help!

    • @apm
      @apm  6 ปีที่แล้ว

      Uncertainty is typically associated with regression, not linear programming. Here is help on regression uncertainty: apmonitor.com/che263/index.php/Main/PythonRegressionStatistics

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

    Can we solve 4 equation using same method?

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

      Yes, any number of equations (up to millions) can be solved with these methods. Here is more information: (Python) apmonitor.com/che263/index.php/Main/PythonSolveEquations and (MATLAB) apmonitor.com/che263/index.php/Main/MatlabSolveEquations

  • @gaaldaniel9360
    @gaaldaniel9360 7 ปีที่แล้ว

    Can you tell how to do this with parameters? (a*x + b*y style)
    How do I tell matlab wich one is the variable and wich one is the constant?

    • @apm
      @apm  7 ปีที่แล้ว +1

      +Gaál Dániel, Here is source code that you can adapt for your problem: apmonitor.com/che263/index.php/Main/MatlabDataRegression

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

    Is matlab able to do stochastic calculus using syms?

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

      I'm not sure. Let us know if you find a solution.

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

      Apply Kirchoff’s Laws for the following circuit and find expressions for currents i1 and i2 as linear equations and solve these equations by using matrices in wxMaxima hence find i1 and i2, where e1 & e2 are (Hint: See Model-1 of skill examples)
      voltages and R1,R2, R3 are resistors given as e1=240 volts, e2 =210 volts R1=17.5 ohms R2=5.5ohms R3=10.5 ohms
      Bro please do it bro give the anser as replie

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

      @@mohan6621 , unfortunately, I don't have time to solve it for you. Here is some help online: www.electronics-tutorials.ws/dccircuits/kirchhoffs-current-law.html

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

    hi i need to connect the code of every method with button in interface some one can help me please is my project pf my defense

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

      Try the uibutton: www.mathworks.com/help/matlab/ref/uibutton.html

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

    est ce que vous pouver m'expliquer la methode de simplexe pour resoudre une equation linéaire

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

    Thanks buddy 😙😙😙

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

    very nice , thank you

  • @kunapradhan1509
    @kunapradhan1509 6 ปีที่แล้ว

    good for first time thank u sir.

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

    Thank you so much sir

  • @EventH0riz0n
    @EventH0riz0n 7 ปีที่แล้ว +2

    The mic-quality isnt on top, but otherwise: Great video!

    • @apm
      @apm  7 ปีที่แล้ว +3

      Event Horizon, I just switched to a high quality mic. Hopefully future videos have more clarity of sound.

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

    can i have your email? I have lot of question about solve a matrix in matlab😔 i have to make a calculator of matrix for my final exam, please somebody help...

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

      Unfortunately, I can't help with the many individual requests I receive each week. Most online forums also don't help with specifics of exam questions. Here are online resources that may help you: apmonitor.com/che263 Good luck on your exam!

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

    I have a final exam in MATLAB on Saturday😥😥😥

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

      I hope these videos can help you prepare. Good luck on your exam.

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

    I love you. Thanks.

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

      I'm glad that I have a fan. Share the love and the video link!

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

    Thanks brother

  • @bnaalaa57
    @bnaalaa57 6 ปีที่แล้ว +1

    Thanks so much 😌

  • @aymanalzahrani7193
    @aymanalzahrani7193 6 ปีที่แล้ว +1

    thanks a lot man .

  • @VishnuDeepak61
    @VishnuDeepak61 7 ปีที่แล้ว

    can we have complex values in the matrix??

    • @apm
      @apm  7 ปีที่แล้ว +1

      The linsolve function can solve linear systems with complex numbers. Try the following as an example:
      A = [1, 1-i; 2, 3];
      b = [1i;2];
      x = linsolve(A,b)
      Result:
      x =
      -0.8000 + 0.6000i
      1.2000 - 0.4000i

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

    Thanks

  • @MrPokoloco
    @MrPokoloco 8 ปีที่แล้ว

    What about a system that equals 0

    • @rrc
      @rrc 8 ปีที่แล้ว

      you can certainly have a zero right hand side. Just set the B vector to a column of zeros at 2:00 in the video. One easy way to create this vector is with the numpy.zeros function.

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

    Life saver

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

    man , thx for this , but u REALLY NEED to buy a new MIC

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

      That was one of my earlier videos where I used my computer microphone. I have a studio microphone now. Thanks for the suggestion.

  • @rawand8092
    @rawand8092 6 ปีที่แล้ว +1

    صباح الخير