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
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.
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.
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 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
Nice explanation. What is the method that fit function usually uses to fit custom equations with data ?
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
Sir could you please help with "Establish UAV mathematical model in CBBA?" PLEASE?
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.
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.
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.
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!
@@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
@@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
@@MGMohammed Thanks,it works now..! I will sub,keep posting amazing content like this