turn matrix into function ?
13 次查看(过去 30 天)
显示 更早的评论
i have two colomns a and b, i want to turn them into a function such as b=f(a),is that possible thank you
0 个评论
采纳的回答
Guillaume
2017-3-27
There is an infinite number of functions that would fit the brief. Perhaps you're looking for a polynomial fit, a spline fit, or something else. It's hard to know with so little information.
f = @(x) b(a == x);
would be a function that fits the brief (and errors for any input that is not in a). I doubt it is what you want.
2 个评论
Walter Roberson
2017-3-27
What relationship does that have to a and b ?
For example do a and b together create a piecewise cubic spline?
更多回答(1 个)
John BG
2017-3-27
Hi Best Programmer
the problem you want to solve, the capture of intersections between curves that DO NOT have defined the exact points of interesection is already solved in the MATLAB exchange.
I have used Mr Schwarz's function intersections.m repeatedly and it always hits the points the right points:
at least 2 points per curve. Try it, it works.
if you find these lines useful would you please mark my answer as Accepted Answer?
To any other reader, if you find this answer of any help please click on the thumbs-up vote link,
thanks in advance for time and attention
John BG
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spline Postprocessing 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!