Introduction to Matlab in English | 14b - Data fitting using "fit" function

Поділитися
Вставка
  • Опубліковано 26 бер 2021

КОМЕНТАРІ • 10

  • @vigneshbalaji21
    @vigneshbalaji21 Рік тому

    Nice explanation. What is the method that fit function usually uses to fit custom equations with data ?

  • @kashmiriatIISc
    @kashmiriatIISc Рік тому

    If we have to fit a data that consists of many "x" vectors and their corresponding "y" values, but having different vector sizes> Can you please provide some guidance

  • @jobaidulislam7506
    @jobaidulislam7506 3 роки тому

    Sir could you please help with "Establish UAV mathematical model in CBBA?" PLEASE?

  • @mertyalcinoz591
    @mertyalcinoz591 2 роки тому

    Hello Prof. Mohammed, one thing about video is that you forget to mention curve fitting toolbox before doing coding. It gave me an error while I am doing fittype>curve fit toolbax is needed. So I figure out how to deal with it but I think it is needed before coding.

    • @MGMohammed
      @MGMohammed  2 роки тому +1

      Thanks for the note!
      You are right, I should have mentioned that in the video. To be honest, I did not know that the data fitting toolbox must be installed to run the "fit" function when I recorded this video :)
      I can post a video to demonstrate that.

  • @onelivingsoul2962
    @onelivingsoul2962 Рік тому

    Hi can you help me with fit([x,y],z,'poly23'),in this 3d fit,i am getting error of dimension problem,even though everything checks out to be fine.

    • @MGMohammed
      @MGMohammed  Рік тому

      This function produces an error when the inputs (x, y and z) are not column vectors, i.e. dimensions in workspace must be n*1 as I have in the video 11*1
      One fast solution is to write the same code using transposes:
      fit([x', y,],z','poly23')
      Hope this solves your problem!

    • @onelivingsoul2962
      @onelivingsoul2962 Рік тому

      @@MGMohammed i have taken x[n,1] y[n,1] and z[n,n],still having this error. I have n^2 data points for each value of x & y,hence z is n×n

    • @MGMohammed
      @MGMohammed  Рік тому

      @@onelivingsoul2962 Try using this code before the fit function:
      [xout,yout,zout]=prepareSurfaceData(x,y,z)
      and use xout, yout and zout instead of x, y and z

    • @onelivingsoul2962
      @onelivingsoul2962 Рік тому

      @@MGMohammed Thanks,it works now..! I will sub,keep posting amazing content like this