How to make function that goes between points
显示 更早的评论
Hello,
so I have data from excel for Y and X, but I can't figure out how to make plot that will show me function that goes between points from data. Can someone help?
Thanks to all that want to help
7 个评论
Sam Chak
2024-1-27
Hi @Marcin, let me try to paraphrase your message using the "New Math Translation (NMT)". Please correct me if I misunderstood your original intent.
Hi Guys,
I have a set of data points from an Excel file, with corresponding X and Y values. I'm looking for assistance in creating a plot that accurately represents the relationship between these data points using a mathematical function.
I'm unsure of how to proceed with plotting the function that connects the data points. Could someone please provide guidance or help me with this?
Thank you in advance for your assistance!
Marcin
2024-1-27
Torsten
2024-1-27
Read the documentation of MATLAB's "fit" function. It offers the possibility to choose between different function types (polynomials, exponential functions, sin/cos- expressions,...) to best-approximate your data.
Marcin
2024-1-27
Sam Chak
2024-1-27
Hi @Marcin
If my guess is correct, RBFN stands for Radial Basis Functions Network. In essence, the RBFN model is used to fit the data, and it likely consists of numerous nodes and layers, making it challenging to express the model as a elegant analytical function, like an exponentially-growing sinusoidal signal (<-- keywords).

John D'Errico
2024-1-27
编辑:John D'Errico
2024-1-27
There are many possible errors you will make, if all you do is try to use a tool like polyfit, or for that matter, any modeling tool. And since we do not see your data, we cannot know which of those failure modes you will most probably trip upon. This will be a learning experience for you. You can do a lot of reading, but even then, reading will not give you the knowledge you will need to make the decisions about which model might be best to use. The point being, it would help if you post your real data. Not fake data. That way we can advise you better in a choice of model.
As well, you need to know what you want from that model. Do you simply want a pretty picture of a curve drawn through the data? Will you want to write the actual model down, in a report, your homework assignment, or a paper? What will you be using the model for? What do you know about the data? What information, if any, do you have about any properties that are necessary in the resultant model? Must the curve pass through the origin, for example? Must it be monotonic to make physical sense?
All of these things and more are important in your choice of a model form. The more and better information you can provide, the better an answer someone can offer to you.
回答(1 个)
Image Analyst
2024-1-27
0 个投票
To fit a smooth curve through the data, if it's a polynomial, you can see my attached demo.
类别
在 帮助中心 和 File Exchange 中查找有关 Half-Normal Distribution 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!