Intersection point coordinate Of curves using Matlab

#Matlab #Intersection #coordinates
%% Anonymous function
F1=@(x) x^2-2;
F2=@(x) 3*x-1;
fplot(F1,[-2 4]); hold on; fplot(F2,[-2 4]);
fun=@(x) (x^2-2)-(3*x-1)
X_int=fsolve(fun,30)
Y_int=3*X_int-1
%% Symbolic function
syms x
F1=x^2-2;
F2=3*x-1;
fplot(F1,[-2 4]); hold on; fplot(F2,[-2 4]);
X_int=solve(F1==F2,10)
X_int=eval(X_int)
Y_int=eval(subs(F2,X_int))

Пікірлер: 6

  • @HamzaDjeloud
    @HamzaDjeloud3 жыл бұрын

    Dear, the content you provide is amazing If you can increase the font size from home tab preferences font 14

  • @10Minuters

    @10Minuters

    3 жыл бұрын

    Hi, thanks for the suggestion :)

  • @asmaemnebhi1492
    @asmaemnebhi1492 Жыл бұрын

    Hello, please, how can I obtain a lot of coordinates at the same time in matlab (x,y,z)(matlab 2014b)? Thanks

  • @siddharth3795
    @siddharth37952 жыл бұрын

    What if we have data that we are going to plot as graph and we want to find the intersection ?

  • @10Minuters

    @10Minuters

    2 жыл бұрын

    Hi Sid, There are several ways to so this. One option is : Given that your data from two curves (x1-y1 and x2-y2) are not sampled at the same rate, you make the sampling to be same using the method explained in this video: kzread.info/dash/bejne/oXWcrq6Kqpmyo6Q.html Then, find minimum of y1-y2. You can consider that point to be your intersection point. This is a good approximation but not exact.

  • @siddharth3795

    @siddharth3795

    2 жыл бұрын

    @@10Minuters thanks alot.