Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

Is it possible to use an argument in order to choose which excel file should be imported

1 vue (au cours des 30 derniers jours)
Joshua Welsh
Joshua Welsh le 5 Sep 2016
Clôturé : MATLAB Answer Bot le 20 Août 2021
I need to import a database depending on an input argument. If a user chooses 'x' as a parameter being studied, I would like to import the 'x' excel database which contains the information to be analysed. Is this possible?

Réponses (1)

Walter Roberson
Walter Roberson le 5 Sep 2016
which_file = input('Name a database', 's');
[num, txt, raw] = xlsread(which_file);
  2 commentaires
Joshua Welsh
Joshua Welsh le 5 Sep 2016
Modifié(e) : Walter Roberson le 6 Sep 2016
Thank you very much for your help. How would I implement this to open the 203 database using the Bead1 definition. I have databases for all numbers shown e.g. 203.xlsx etc
% Acquired Bead SSC-H Median Values
Bead1 = 203;
Bead2 = 400;
Bead3 = 707;
Bead4 = 1019;
Bead5 = 1587;

Cette question est clôturée.

Community Treasure Hunt

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

Start Hunting!

Translated by