Interp1 question on excel data with multiple columns and blank/empty cells
Show older comments
Hello,
I have an excel data which is a digitized plot for pressure (p) vs, distance (d), at different flame speeds.
E.g. attached, I have 11 flame speeds, and hence 11 p-columns with their 11 d-columns. For each flame speed, the pair (p vs.d) is independent of other pairs. However, # of rows is not same in all colums. E.g., Flame Speed-1 has 173 data points (rows) and Speed-2 has 55 datapoints. So, MATLAB is reading the empty rows as NaN, as expected.
At a given flame speed, and using the corresponding (p-d) pair, I want to use interp1 to estimate p for a d.
Any p-d column that has empty cells and hence NaN in MATLAB is giving Interp1 "finite data" error, as expected.
Also, Interp1 also doesn't work if I replace all NaN by a number (say 0); I am getting "absence of unique values" error.
I tried rmmissing to remove "missing data from excel", but it truncated the longer columns to the shortest column length.
To summarize my issue: how do I interpolate to calculate p at a d of 0.054 at Flame Speed 2 (attached excel sheet)? Since the p-d pair columns for Speed 1, 3, and 7 don't have NaN values, it can easily interpolate at these flame speeds. But not for other flame speeds.
Thanks for your help.
KD
Accepted Answer
More Answers (0)
Categories
Find more on Spreadsheets in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!