Getting Values from Excel Table on Matlab

51 Views Asked by At

I've been trying to simulate a chemical reactor on Matlab. For this to work I need to be able to get some values from excel tables with thermodynamic properties. Each table is for a chemical species and the first row is always the temperature.

I would like to input the temperature so that Matlab would search the temperature column for the value and return, for example, the associated enthalpy.

I used xlsread to load the tables as matrices but I am having trouble to tell Matlab what to do next.

I've been told to try

[row, ~] = find(temp<=data(:,2)); %temp is the given temperature

but this just returns me

row = 1, 2, ...

I would also like to be able to handle intermediate temperatures that are not explicit in the table, it could be some kind of interpolation or just getting the nearest value.

Any help will be truly appreciated.

0

There are 0 best solutions below