Borrar filtros
Borrar filtros

Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

How to use importfile when there is only one data in cell A1?

1 visualización (últimos 30 días)
Warakorn
Warakorn el 2 de Abr. de 2014
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
I have an excel file named "Test1.xlsx" and there is only one data in cell A1.
I found the error messages when I use the following command
>> a = importfile('Test1.xlsx',1)
??? Error using ==> cellfun Input #2 expected to be a cell array, was char instead.
Error in ==> importfile at 33 data(cellfun(@(x) ~isempty(x) && isnumeric(x) && isnan(x),data)) = {''};
When I add one more data to cell A2, this command works fine
>> a = importfile('Test1.xlsx',1)
Do you know how to use "importfile" when there is only one data in cell A1?
Thank you very much,
OOO

Respuestas (1)

Azzi Abdelmalek
Azzi Abdelmalek el 2 de Abr. de 2014
Editada: Azzi Abdelmalek el 2 de Abr. de 2014
You can use xlsread

La pregunta está cerrada.

Community Treasure Hunt

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

Start Hunting!

Translated by