Info

此问题已关闭。 请重新打开它进行编辑或回答。

2D function contruction

1 次查看(过去 30 天)
mortain
mortain 2016-3-17
关闭: MATLAB Answer Bot 2021-8-20
Hello, I had scattered data from 3 experiments. The tests measure voltage and flow rate for three different geometries. I have two matrices: if true % code
Flow = [19.05 27.13 34.08 40.48 45.00 49.65 20.55 26.39 34.22 39.44 45.53 49.96 19.88 26.47 33.20 40.04 44.78 49.49];
Voltage = [4.26 4.55 5.23 5.90 6.55 7.27 4.13 4.25 4.32 4.49 4.8 5.2 4.1 4.14 4.21 4.30 4.40 4.50];
geo = [22.5,45,90]; end
I would like to create a function that, given a new value of geo and Flow gives back the voltage. I think it could be an easy thing to do.
I tried with scatteredinterpolant, but didn't succeed in building the interpolant. It keeps giving an error about matrix size, tbh I don't really understand how the input matrix need to be.
I tried with fitlm quadratic, but the values predicted values do not correspond to the original ones (a difference between experiment and model up to 20%)
Would you have any suggestions, please?
Thanks

回答(1 个)

mortain
mortain 2016-3-17
I sorted it using cftool. Wonderful tool!

此问题已关闭。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by