problem with reading data from excel

1 vue (au cours des 30 derniers jours)
Prakhar Modi
Prakhar Modi le 20 Août 2019
Commenté : Prakhar Modi le 20 Août 2019
Hello everyone,
let say I have an excel file say.
x1/x2 1 2 3 4 5
1 4 12 45 54 48
2 6 15 20 59 62
3 7 17 25 60 78
4 8 19 26 62 80
5 9 20 27 64 86
so now i am getting some values of x1 and x2 and i want that the code should read a particular value for x1 and x2. For example
x1=2, x2=4, ans=59
x1=3, x2= 5, ans=78
so is this possible that code itself read data for .mat file or excel file

Réponse acceptée

Alex Mcaulley
Alex Mcaulley le 20 Août 2019
Do you mean this?
data = xlsread('yourExcel.xlsx');
data = data(2:end,2:end)
data(2,4) %For example: x1 = 2; x2 = 4

Plus de réponses (0)

Catégories

En savoir plus sur Data Import from MATLAB dans Help Center et File Exchange

Tags

Produits


Version

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by