Filter löschen
Filter löschen

Error using interp1

3 Ansichten (letzte 30 Tage)
Barbara Schläpfer
Barbara Schläpfer am 7 Dez. 2020
Beantwortet: Star Strider am 7 Dez. 2020
I am trying to do an optimization with values generated from abaqus. But I am struggeling to adjust my sample size so it matches my experimental data.
[unique_expperimental_dis, index] = unique(xlsread('Tensile_test_45_exp_avg.xlsx','A:A'));
exp_data = xlsread('Tensile_test_45_exp_avg.xlsx','B:B');
unique_experimental_force = exp_data(index,1);
abaqus_force_interp= interp1(unique_expperimental_dis,unique_experimental_force,abaqus_results(:,1));
Error using interp1>reshapeAndSortXandV (line 424)
X and V must be of the same length.
Thanks for any help.

Antworten (1)

Star Strider
Star Strider am 7 Dez. 2020
The error is straightforward — the first and second argument vectors must be the same length. They can be different sizes, so one can be a row vector and the other a column vector, however they must have the same numbers of elements.
From your code, it appears that they should be, so we would have to have your data to see what the problem is.

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by