I want to import a row of headers form Excel into matlab then put each header into its according variable’s name in MATLAB. Just like the picture below shows, I import all the variables into a matrix ‘X’, then I would like to import the header one by one to rename all the columns. Is there any way to do this?

I want to import a row of headers form Excel into matlab then put
Share
See the documentation of xlsread; you have to load all the data:
from matlab doc: Example
Request the numeric data, text, and a copy of the unprocessed (raw) data from myExample.xlsx:
In case you know in which cells the headers are, you can also specify a range to read from the excel file:
this gives (for the example data used above ^^):