Import grid data and surface fit
显示 更早的评论
Hi,
Looking for help on what is probably an easy problem. I can't even get data into Matlab correctly to start!
I have MS Excel grid - temperature (orange), %alcohol (blue), density (green). This is excerpt:

I would like to create a function/formula: input density and temperature, output %alcohol. This function should interpolate/extrapolate, so for example could enter temperatures like 34.6, 40.7
So guess I would like to fit a surface and get function equation, and then reorganize so %alcohol is on LHS.
Questions:
1. First problem how to import data into grid format I can use? I have tried to bring in as table, but treats every column as different variable.
2. How to best fit a function to this data and "solve" for %alcohol.
Any suggestions, similar examples, outline workflows appreciated.
Thanks, Michael
采纳的回答
更多回答(1 个)
ahmed nebli
2018-9-2
0 个投票
1- u need to use the function xlsread , see this link : https://www.mathworks.com/help/matlab/ref/xlsread.html
3 个评论
Michael Cody
2018-9-3
ahmed nebli
2018-9-3
i think once you imported the xls sheet, u need to store it in a .mat file , then you can treat the double sttored in the .mat like you want
Michael Cody
2018-9-4
类别
在 帮助中心 和 File Exchange 中查找有关 Interpolation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!