Determine point intersection of 2 vectors with different values.
7 次查看(过去 30 天)
显示 更早的评论
Hi,
I want to find the intersection point of 2 number series a=[0.1 0.3 0.5 0.7 0.9] b=[-0.0687 -0.0761 -0.0624 -0.0325 -0.0048] I would like to find the values of b for a at having a single step instead of a double one so a would look like:
a=[0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9]
I am able to plot the curve using the standard plot function and see where approximately the lines intersect but I'd be nice to have the exact value instead of an approximation.
Does anyone have a solution
2 个评论
David Sanchez
2014-4-15
What do yo mean by " the intersection point of 2 number series " ??
I have read your question several times and can not figure out what exactly you want to achieve. Could you give a more cleat example of your goal from your input?
回答(3 个)
ragesh r menon
2014-4-15
If you need analytical solution, then you should first have analytical expressions like polynomial expressions etc. . So use "cftool" to fit polynomial with your current data.(I use the word polynomial since "b" seems to be nonlinear function). Once you get the required polynomials you can solve using "solve" in matlab
Star Strider
2014-4-16
By ‘intersect’ do you mean ‘interpolate’?
If so, this works:
a=[0.1 0.3 0.5 0.7 0.9];
b=[-0.0687 -0.0761 -0.0624 -0.0325 -0.0048];
a2=[0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9];
b2 = interp1(a,b,a2);
The plots of plot(a,b) and plot(a2,b2) will look the same, because interp1 does a linear interpolation by default. (See the documentation for interp1 for other options.)
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Interpolation 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!