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

  • @brynmrsh
    @brynmrsh 5 лет назад +23

    This is great. Now I can solve my homework problem. My school thinks that we become great engineers by being taught nothing, but being forced to use specific solution techniques, such as ode45, to solve problems that we have no idea how to even work out on paper. Thankfully, there are great schools which put examples on RUclips.

  • @Kay-dx8vm
    @Kay-dx8vm 3 года назад +1

    Finally, Thank you so much for this video. Ive been sitting for hours following instruction from my textbook with a bunch of errors.

  • @VDEngineering
    @VDEngineering 7 лет назад +21

    Could you please do a tutorial where the function has extra parameters which are time dependant?
    For example, the 6-DOF equations of motion have coefficients which change depending on the pitch angle and so on.

  • @Handleoriginal12
    @Handleoriginal12 2 месяца назад +2

    I wish I stumbled on this video sooner. My professor expected us to know matlab without ever being taught it. I might just make it with this guide now

    • @Handleoriginal12
      @Handleoriginal12 Месяц назад +1

      Update. I passed with a B. Thats a lot better than i expected. Thank you!

  • @LL-kn1de
    @LL-kn1de 5 лет назад +3

    Thank you! This really helps! Can you do a 2nd order d.e relate with RLC circuit problem?

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

    Dear sir thank you for your lecture on using ode45 for state variable solutions. my question is, is the name func a predefined name that can not be changed to other name? should I necessarily replace every time I save my file with same name func?

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

    This helped... thanks! So this gives us the plot. But what can I do get the actual final equation of x?

  • @whitenancy4349
    @whitenancy4349 6 лет назад

    Thank you so much sir.
    I have a question that I would like to ask you
    If I have an equation: dy/dx = 8*y^k - 3*y The given numbers: k=[0.1:0.01:0.2] y0=0.6 x=[0 10] y1=2 How can I use ODE to solve the equation and use that solution to find x1 (x1 is at y1) for every value of k. CANNOT use arrayfun or find.

  • @anasene6678
    @anasene6678 6 лет назад +4

    You just saved my life.Thank you!!!!

  • @AntonHax
    @AntonHax 6 лет назад +2

    Thanks K-J! you helped us greatly, from sweden with kisses xxxo

  • @EnDivine
    @EnDivine 7 лет назад +5

    Very well explained sir! Thank you very much! :) :)

  • @salimamansoura7838
    @salimamansoura7838 3 года назад +1

    May God reward you for all your effort and all the valuable information you easily provide to us .

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

    Is also possible for an ODE no homogenous?

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

    THANK YOUUUUU CPPMECHENG :):)

  • @ASIR070707
    @ASIR070707 24 дня назад

    Great video, the first I watch learning about state-space presentation of ode. I followed the slides religiously and there is probably an error at 2:22. Last line: The first quantity (a_n-a/a_n) on the right-hand side of the equation should be multiplied by x_n and not x_n-1?

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

    wow! so nice and compact! thanks!

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

    Thanks for the tutorial, it helped!

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

    How can i use Ode45 if dx(2) is a piecewise function?

  • @engi5843
    @engi5843 5 лет назад +10

    ODE I wanna cry Industrial Engineering TT

  • @ashishhirani8617
    @ashishhirani8617 5 лет назад +3

    what is the meaning of (:,1) after the x in the plot function?

    • @cyber5787
      @cyber5787 5 лет назад +16

      It mean select every row from column 1
      for matrix
      1 6
      2 7
      3 8
      4 9
      5 10
      Example:
      (1:3 , 1) mean select row 1 to 3 from column 1 which gives
      1
      2
      3
      Example:
      (2:3 , 2) mean select row 2 to 3 from column 2, which gives
      7
      8
      if ( a:b, 1) and a, b are omitted, it mean select everything from column 1
      Hope that help :D

  • @furn6341
    @furn6341 9 месяцев назад +1

    How can I plot y''-xy=0 with initial conditions y(0)=1, y'(0)=1 ?

  • @rah1092
    @rah1092 7 лет назад

    what is - xdot - for? am i able to use it for equations whose independent variable is not time? thanks

    • @CPPMechEngTutorials
      @CPPMechEngTutorials 7 лет назад

      "t" is any independent variable. In dynamic systems, time is usually the independent variable.

  • @James-sh7rr
    @James-sh7rr 6 лет назад

    Very helpful. Thank you for sharing!

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

    thank for this video, really helped me understand how to use the matlab ode function!

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

    Thanks a ton! Was really helpful. :) Was looking for just this

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

    great video cleared everything in 1 video thank you

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

    Awesome video 👍👍

  • @northaurora1
    @northaurora1 7 лет назад

    very very good one
    thanks a lot-............
    it really helped me a lot

  • @21seanlin
    @21seanlin 8 месяцев назад

    excuse me, if I solve nonhomogeneous ODEs, Do I need to convert r(x1) into yp obtained by the modification rule? and if I use this method, how to define C,Kcos,Msin.
    Or should I just add r(x1) directly like this: dy1dx1(4)=y1(4)*Coefb/Coefa-y1(3)* Coefc/Coefa-y1(2)*Coefd/Coefa-y1(1)*Coefe/Coefa+r(x1);

  • @vipulkumar5436
    @vipulkumar5436 7 лет назад +1

    at 2:22. shouldn't there be xn instead of xn-1 with (-an-1/an). talking about first expression on the RHS.

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

    How can we use ode45 inside a for loop

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

    Thanks Dr.

  • @stressedbyamountainofbooks
    @stressedbyamountainofbooks 2 месяца назад

    How do you do this if the known value for xdot is when t=10, this is not initial value

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

    Thank You. You made my day. I've got errors that odearguments must return a column vector. Transposition at the end of function solved the problem. Thank you very much :D :D :D :D :D

  • @user-fo5jv3zu8jn2
    @user-fo5jv3zu8jn2 2 года назад

    감사합니다.

  • @sunitadeb6076
    @sunitadeb6076 6 лет назад

    thank you

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

    You are the Krall !!

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

    thank you so much for this !

  • @Phamquest
    @Phamquest 6 лет назад +4

    Very informative and clear, thanks!

  • @ryan-oe6ft
    @ryan-oe6ft 5 лет назад

    Thank you. The MatLab help files were very difficult to understand.

  • @DhruvPatel-jf5gg
    @DhruvPatel-jf5gg Год назад

    ultimately we are finding x right??...How Matlab going to find it from xdot=[xdot1,xdot2] values?...please guide me!!

  • @bhupenderkumarsom1975
    @bhupenderkumarsom1975 Год назад

    struggling to solve a system of equations, could you please help me. It is a single server queuing model.

  • @amnaalshamsi6400
    @amnaalshamsi6400 6 лет назад

    thank yoooooooou from Oman

  • @aajamerepyar4586
    @aajamerepyar4586 Месяц назад

    how can we plot x' vs t or x' vs x

  • @debasis356
    @debasis356 7 лет назад

    What if the boundary condition x(0)=5; and x(10)=3. In my case, in boundary condition in place of xdot, x is given.

    • @TaterBot1000
      @TaterBot1000 6 лет назад

      Hey there. The ode isn't solvable unless all initial conditions at a particular given time is known. Thus having x(0) and x(10) doesn't help. Nor does having x(0) and xdot(10) or xdot(0) and xdot(10). None of those combinations make the problem solvable. In order to obtain a solution, you need x(0) and xdot(0) or x(10) and xdot(10), etc.

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

      you can use shooting method that will convert the boundary value problem to initial value problem. there are videos on this

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

    Thanks buddy 👍

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

    Shouldn't it be (:,2)) instead of 1?

  • @Ankit-df8rw
    @Ankit-df8rw 4 года назад

    thank u man!!! life saver

  • @haddedarbia4141
    @haddedarbia4141 7 лет назад

    hi plz can we use ode45 to solve a differential equation with non-constant coefficients !!

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

      If you're still searching for an example like that, you can find one in this video. ruclips.net/video/hR9O7sVOArE/видео.html The link already connects you to the example problem.
      There really isn't much difference with non-constant coefficients, so you've likely found out how by now.

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

      Yes we can

  • @cuongho7007
    @cuongho7007 6 лет назад

    if coeficient is matrix so how i can do it..

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

      I'm doing a problem with matrix and no homogenous. Have the answer?

  • @Rockstar1376
    @Rockstar1376 8 лет назад

    Thanks

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

    why x(: ?????

  • @BabyVedaChanel
    @BabyVedaChanel 7 лет назад

    z,t -C/ ρs V (x)kϕ(x)(1 + z2 ,x)-k/2 = 0 i want simulate this equation in mat lab please help me

  • @Hudmyq
    @Hudmyq 6 лет назад

    Hi, I dont know if you can read this. Thanks for your video. It is very clear. However, the problem what I'm trying to solve is two variables 2nd order differential equation set. For example, 32 * d^2x1/dt^2 + 48* d^2x2/dt^2 +3*dx1/dt +x1=0 ; 14*d^2x1/dt^2 +1.732*d^2x2/dt^2 +10* dx2/dt+ x2=0 . Can you please tell me how to do it in matlab ?

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

    This will also work:
    [t,x] = ode45(@(t,x) func(t,x),[1,5],[5 3]); %solves EoM and generates vector of time values from 1-5 with initial conditions x0=3 and v0=3
    figure
    plot(t,x(:,1))
    hold on
    plot(t,x(:,2))
    function xdot = func(t,x) %Outputs EoM in stae space form xdot = f(t,x)
    xdot(1)=x(2);
    xdot(2) = 20-7*x(2)-10*x(1);
    xdot=xdot';
    end

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

    [t,x]=ode45('func',[0 5],[5 3]);
    Error using ode45
    Too many input arguments.

  • @shivjikhanath3586
    @shivjikhanath3586 7 месяцев назад

    Best

  • @cyrusIIIII
    @cyrusIIIII 7 лет назад

    what if you have system of equations of second order?

    • @CPPMechEngTutorials
      @CPPMechEngTutorials 7 лет назад

      If you have N second order ODEs, you need to convert them to 2*N first order ODEs.

    • @cyrusIIIII
      @cyrusIIIII 7 лет назад

      CPPMechEngTutorials Yes but what if they depend on each other for example I have xdoubledot in both of my equations?

  • @austinwalker5176
    @austinwalker5176 7 месяцев назад

    MATLAB gives a "Not enough input arguments" error code, a "Unrecognized function or variable 'func'. Bad example.

  • @hernanes5533
    @hernanes5533 8 лет назад

    buenas vi tu codigo y me parece muy interesante... por favor me podrias ayudar a resolver esta practica soy muy novato en matlab.. solohernanes@gmail.com
    2 IDENTIFICACIÓN COMPETENCIAS CONTENIDO TEMÁTICO INDICADOR DE LOGRO
    Modelar matemáticamente sistemas analógicos SLTI.
    Sistemas lineales e invariantes en el tiempo - SLTI:
    Modelado de sistemas mediante ecuaciones diferenciales.
    Respuesta de entrada cero.
    Respuesta de estado cero.
    Estabilidad IIBO y BIBO.
    Representa matemáticamente un sistema en el dominio del tiempo mediante EDO.
    Representa matemáticamente un sistema en el dominio de la frecuencia mediante transformada de Laplace.
    Halla la respuesta de un sistema ante cualquier excitación.
    Determina la estabilidad IIBO y BIBO de un sistema a través de la ubicación de los polos.
    3 RECURSOS REQUERIDOS
    • Equipo de cómputo:
     Matlab, TheMathworks Inc.
    4 PROCEDIMIENTO
    Un sistema lineal invariante en el tiempo (SLTI - linear and time invariant) se puede modelar mediante la ecuación diferencial: Σ𝑎𝑖𝐷^(𝑖)𝑦(𝑡)𝑛𝑖=0=Σ𝑏𝑖𝐷^(𝑗)𝑥(𝑡)𝑚𝑗=0
    Donde la respuesta total 𝑦(𝑡) está dada por la respuesta de entrada cero (zero input) más la respuesta de estado cero (zero state): 𝑦(𝑡)=𝑦𝑧𝑖(𝑡)+𝑦𝑧𝑠(𝑡)=Σ𝑐𝑘𝑒^(𝜆𝑘𝑡)+𝑥(𝑡)∗ℎ(𝑡)
    Donde ℎ(𝑡) es la respuesta al impulso, 𝜆𝑘 es la 𝑘-ésima raíz de la ecuación característica y 𝑐𝑘 son constantes a determinar con las condiciones iniciales.
    La función de transferencia del sistema se define como:
    ℒ{ℎ(𝑡)}=𝐻(𝑠)=𝑌(𝑠)𝑋(𝑠)=Σ𝑏𝑖𝑠^𝑗=0Σ𝑎𝑖𝑠^𝑖=0=Σ𝑏𝑖𝑠^𝑗=0Π(𝑠−𝜆𝑘)
    4.1 PROCEDIMIENTO DE LA PRÁCTICA
    Dado el sistema:
    𝑎𝑛*(𝑑^𝑛*𝑦(𝑡))/(𝑑𝑡^𝑛)+𝑎𝑛−1*𝑑^𝑛−1𝑦(𝑡)/𝑑𝑡^𝑛−1+⋯+𝑎1𝑑𝑦(𝑡)𝑑𝑡+𝑎0𝑦(𝑡)=𝑏𝑚𝑑𝑚𝑥(𝑡)𝑑𝑡𝑚+𝑏𝑚−1𝑑𝑚−1𝑥(𝑡)𝑑𝑡𝑚−1+⋯+𝑏1𝑑𝑥(𝑡)𝑑𝑡+𝑏0𝑥(𝑡)
    Diseñe una rutina en Matlab que tenga como parámetros de entrada única y exclusivamente 𝑏, 𝑎, las condiciones iniciales del sistema y la ecuación de la señal de entrada. Tanto 𝑏 como 𝑎 se deben ingresar como vectores y no se le debe exigir al usuario que ingrese estos elementos número por número. Las condiciones iniciales sí se pueden pedir de forma individual, es decir, una por una.
    Con esta información que se le pide al usuario, el programa debe hacer lo siguiente:
    a. Grafique los polos del sistema en el plano de Argand.
    b. Indique en una ventana emergente si el sistema es IIBO estable, inestable o marginalmente estable.
    c. Indique en otra ventana emergente si el sistema es BIBO estable, inestable o marginalmente estable.
    d. Muestre en la ventana de comando la función de transferencia del sistema.
    e. Muestre en la ventana de comando la respuesta de entrada cero.
    f. Muestre en la ventana de comando la respuesta de estado cero.
    g. Muestre una gráfica con cuatro subplots que muestren 𝑥(𝑡),𝑦(𝑡),𝑦𝑧𝑖(𝑡) e 𝑦𝑧𝑠(𝑡) en el intervalo 0≤𝑡≤10.
    5 PARÁMETROS PARA ELABORACIÓN DEL INFORME
    a. Funciones y comandos útiles: eval, roots, dsolve, int, laplace, syms, entre otros.
    b. Debe ser cuidadoso al etiquetar los ejes y las gráficas. Gráfica sin etiquetas no se tendrán en cuenta.
    c. Envíe los scripts en un solo archivo .m

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

    Knew you were a korean