0

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

m_goldberg
  • 107,779
  • 16
  • 103
  • 257
  • Try with ListInterpolation – zhk Jun 26 '17 at 00:55
  • Try converting the Dataset to an array, maybe Values /@ Normal@k. But you should really post code people can use to check solutions. – Michael E2 Jun 26 '17 at 01:05
  • Related/duplicate: https://mathematica.stackexchange.com/questions/149060/cant-listplot-two-set-of-data – Michael E2 Jun 26 '17 at 01:07
  • 1
    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? – Kuba Jun 26 '17 at 06:19

1 Answers1

2

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

m_goldberg
  • 107,779
  • 16
  • 103
  • 257