How to generate a function from x-y vectors?
古いコメントを表示
Hello MATLAB users. I got two vectors (say x and y). Is there any way to create a function i.e. y=f(x). I do not want the expression. I just want to create the function in matlab for further calculations. For ease: x=[1 5 0 32 8]; y=[10 1 654 32 100];
2 件のコメント
the cyclist
2017 年 2 月 6 日
Your question is not clear. What does "use these vectors in function form" mean?
Do you mean you want to find a function f(x) that will (approximately?) fit the x-y data? If so, what type of function? A polynomial?
Ajay Goyal
2017 年 2 月 6 日
編集済み: Ajay Goyal
2017 年 2 月 6 日
採用された回答
その他の回答 (3 件)
Yifan Ma
2018 年 2 月 6 日
0 投票
What you are looking for is map container. https://de.mathworks.com/help/matlab/ref/containers.map-class.html
Hi,
I have 2 vector (x, y) and I desire math expression y=f(x)
x must be syms. How to?
tnks
For you.

カテゴリ
ヘルプ センター および File Exchange で Code Performance についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!