0
$\begingroup$

I imported a list of data using

k = SemanticImport["Desktop/k_CARBON_eV.txt"]

enter image description here

And then I wanted to interpolate the data using:

kinter = Interpolation[k];

But I got a message: enter image description here

$\endgroup$
  • $\begingroup$ Try with ListInterpolation $\endgroup$ – zhk Jun 26 '17 at 0:55
  • $\begingroup$ Try converting the Dataset to an array, maybe Values /@ Normal@k. But you should really post code people can use to check solutions. $\endgroup$ – Michael E2 Jun 26 '17 at 1:05
  • $\begingroup$ Related/duplicate: mathematica.stackexchange.com/questions/149060/… $\endgroup$ – Michael E2 Jun 26 '17 at 1:07
  • 1
    $\begingroup$ Why are you still working with SemanticImport if you can't handle it? It was suggested to you to try to import "Table" or "Data" couple of times, have you tried? $\endgroup$ – Kuba Jun 26 '17 at 6:19
2
$\begingroup$

k is a dataset, which has head Dataset. Interpolation wants a list, typically a list of data pairs. To covert k to such, use Normal.

k = Dataset[{{5.88, .39}, {5.83, .41}, {5.73, .48}, {5.75, .58}}];
kinter = Interpolation[k // Normal];
Plot[kinter[x], Join[{x}, kinter["Domain"][[1]]]]

plot

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.