Solving ODEs in MATLAB

Поделиться
HTML-код
  • Опубликовано: 18 сен 2024

Комментарии • 23

  • @larissaobeng7106
    @larissaobeng7106 2 года назад +1

    You don't understand how much you just helped me with my numerical analysis assignment. Thank you so much!!

  • @deadliftbro
    @deadliftbro 3 года назад

    You saved my life, I am taking a course and I had no idea how to use Matlab.. THANKS!

  • @vv4983
    @vv4983 2 года назад

    You're a saviour. Well explained!

  • @tachyontech
    @tachyontech 4 года назад

    Wow great video, clear explanation and smart organization

  • @what_about_mike
    @what_about_mike 4 года назад +1

    Excellent tutorial, thank you mr. Steveson!

  • @VincentStevenson
    @VincentStevenson  6 лет назад +5

    At 18:17, there is a mistake in the MATLAB code, the last term in diffeqs(2,1) should be multiplied by cA (concentration of A at a given time).
    At 2:55, a well-mixed CSTR indicates that the outlet concentration and temperature is the same as the INTERNAL temperature and concentration, NOT the inlet!

  • @Zicozaki
    @Zicozaki 4 года назад

    you are excellent, thank you very much

  • @yelmal97
    @yelmal97 5 лет назад +1

    Thanks, it helped me a lot

  • @upasanaburagohain8062
    @upasanaburagohain8062 4 года назад +1

    Thank you ...

  • @atanughosh4221
    @atanughosh4221 6 лет назад +1

    Mr. Stevenson, great tutorial ,thanks. I have one problem and can't fig . out how to solve it.
    I have an Arrhenius eq. in glass crystallization problem
    Kc= Ko . exp (-Ea/k.T)
    Ko= 1e22 [1/s]
    Ea= 2 [eV]
    k= 8.617e-5 [eV/K]
    T= 300 to 1000 K variable
    and an ODE
    d Ca/ dt = Kc.( 1-Ca)
    a) I want to solve ( Ca, t ) for different T ( say 300, 400, .... 700) and plot the result, initial cond =0 and t is from 1e-9 to 1e-3 in equal interval.
    Your help will be highly appreciated.

  • @nanayawangu4467
    @nanayawangu4467 3 года назад

    Hi, can this approach also be used for 2 coupled differential equations

  • @pedrocalorio1655
    @pedrocalorio1655 4 года назад

    what about when I have a ODE system with step input that affects all equations?

  • @mounarahal256
    @mounarahal256 5 лет назад

    Hi thank you for the video but how should i work when Ta , Cpa and Cpb iare ariable in the time and in each hour Ta, Cpa and Cpb have different values??

  • @indranidas4805
    @indranidas4805 5 лет назад

    Hi, I wanna solve coupled odes which includes complex coefficients, how to fix a code on that? I wanna break it up into real and complex part, because I have to give initial values to both of these parts..do you have any comment?

  • @jorgemercent2995
    @jorgemercent2995 3 года назад

    difffeqs(1,1), diffeqs(2,1), diffeqs(3,1) are all row, with each subseuent output added to the right, then how come all of a sudden, in the name ODE function, it becomes a colume in varsol??? So confusing! What is going on!!!

  • @ramiz2999
    @ramiz2999 5 лет назад

    Congratulations for a great video. I typed everything like you, but when I start the ode_sys.m, it shows me the following error:
    ??? The input argument "var" is undefined.
    Error in ==> ode_sys at 3
    t = var (1);
    When I run script.m, it shows me the image of the temperature dependency from time, but without the line and the result.
    Can you help me? Thank you.

    • @VincentStevenson
      @VincentStevenson  5 лет назад

      When you solve ODE systems in Matlab, you never run the actual function in which you define your ODE systems. You only call the script that will call your ODE system with the required parameters.
      var is an array, the second argument passed to the ode_sys.m function. Make sure you are passing the correct array to ode_sys.m, it should work and you should get a plot at the end.

    • @ramiz2999
      @ramiz2999 5 лет назад

      ​@@VincentStevenson Thank you for your reply. Now I've done more detail and got a plot just like you did.
      Thank you once again.
      Is the final value for the temperature of 315.1682 K, the value for cA = 2.2753 kmol / l and for cB = 0.3162 kmol / l?
      Can you explain me more in detail:
      range = [1:60];
      Ics = [600,3,0];
      [Tsol, Varsol] = ode23 (@ ode_sys, range, ICs);
      Could be written t = [1:60] instead of range=[1:60];
      Are initial conditions could write like:
      T0 = ​​600;
      CA0 = 3;
      CB0 = 0;
      instead of ICs=[600,3,0]
      Could it be written:
      [t,var] instead [tsol, varsol]?
      I know there are a lot of questions, but I would be very grateful if you could find the time and answer me.
      Thanks in advance.

  • @jorgemercent2995
    @jorgemercent2995 3 года назад

    var(1), var(2), var (3), where do they randomly come form??? So confusing? Why don't people define their variables? your var is matrix, what terms do it contain? How do you even slot numbers into var matrix and why would you even want to do that????

  • @ethiopiatuday1637
    @ethiopiatuday1637 3 года назад

    10Q