problem with reading data from excel

1 次查看(过去 30 天)
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

采纳的回答

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

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Data Import from MATLAB 的更多信息

标签

产品


版本

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by