Mathematica Interpolation function error

  • #1
Youssi
6
2
TL;DR Summary
Interpolation error : :inder: The order-2 derivative of {1651.15,0.129739} is not a tensor.
Hello everyone,
I am relatively new to Mathematica, and I am encountering an issue when trying to interpolate numerical data imported from an Excel file.
Here are the steps I've taken:
I imported the numerical data from an Excel file into Mathematica.
I attempted to interpolate the data using the command:
[Lambda]Interp = Interpolation[lambda, InterpolationOrder -> 2];
However, I encountered the following error:
Interpolation::inder: The order-2 derivative of {1651.15,0.129739} is not a tensor.
As a new user, I'm unsure how to correct this issue. I would greatly appreciate any guidance or suggestions on resolving this error. If there are alternative approaches to achieve the interpolation, please feel free to share them.

Thank you in advance for your help!
 

Attachments

  • condu_therm_rer.xlsx
    11.5 KB · Views: 26
Physics news on Phys.org
  • #2
How do you import the data?
 
  • Like
Likes Youssi
  • #3
This the command that i use to import data :
Lambda= Import["C:\\Users\\Documents\\Modélisation\\1_\\mathematica\\condu_therm_rer.xlsx"];
and this is how the data are displayed:
{{{707.637, 0.0556025}, {1280.52, 0.092702}, {1415.35, 0.0927435}, {1651.15, 0.129739}, {1887.03, 0.148273}, {2055.5, 0.166787}, {2257.63, 0.194541}, {2358.68, 0.213034}, {2527.14,0.231548}, {2560.66, 0.277712}, {2661.67, 0.305435}, {2729.01, 0.323918}, {2796.23, 0.370092}, {2930.91, 0.407057}, {2964.39, 0.462452}, {3132.67, 0.527119}, {3132.48, 0.573273}, {3300.75, 0.637941}, {3300.56, 0.684095}, {3401.5, 0.73028}, {3536.33, 0.730321}, {3637.83, 0.638044}, {3941.43, 0.582753}, {4110.08, 0.555112}, {4177.65, 0.51821}, {4346.19, 0.518262}, {4548.44, 0.518324}, {4683.08, 0.56452}, {4851.39, 0.619956}, {4851.12, 0.684572}, {4884.6, 0.739967}, {4951.87, 0.776911}, {4985.46, 0.804613}}}
 
  • #4
Youssi said:
This the command that i use to import data :
Lambda= Import["C:\\Users\\Documents\\Modélisation\\1_\\mathematica\\condu_therm_rer.xlsx"];
Mathematica imports multiple Excel worksheets all at once in the form of a list: {Sheet1, Sheet2, ...}. Since you only have one sheet, change your import statement to:
Lambda=Import["C:\\Users\\Documents\\Modélisation\\1_\\mathematica\\condu_therm_rer.xlsx"][[1]];
to extract your single sheet from the list. This removes the outermost set of braces and allows the interpolation to run successfully.
 
  • Like
Likes Youssi and DrClaude
  • #5
renormalize said:
Mathematica imports multiple Excel worksheets all at once in the form of a list: {Sheet1, Sheet2, ...}. Since you only have one sheet, change your import statement to:
Lambda=Import["C:\\Users\\Documents\\Modélisation\\1_\\mathematica\\condu_therm_rer.xlsx"][[1]];
to extract your single sheet from the list. This removes the outermost set of braces and allows the interpolation to run successfully.
Thank you very much! It worked.
 
  • Like
Likes renormalize

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
297
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
250
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
914
  • Programming and Computer Science
Replies
6
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
6
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
11
Views
16K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • Programming and Computer Science
Replies
1
Views
694
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
Back
Top