Filter löschen
Filter löschen

problem with reading data from excel

1 Ansicht (letzte 30 Tage)
Prakhar Modi
Prakhar Modi am 20 Aug. 2019
Kommentiert: Prakhar Modi am 20 Aug. 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

Akzeptierte Antwort

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

Weitere Antworten (0)

Kategorien

Mehr zu Data Import from MATLAB finden Sie in Help Center und File Exchange

Tags

Produkte


Version

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by