division of uploaded excel file

2 vues (au cours des 30 derniers jours)
Giorgi
Giorgi le 22 Août 2014
Commenté : Giorgi le 22 Août 2014
Hi all, well i want to upload excel file and then divided it in parts, the excel file contains text and numerical data, i wrote a code but it doesn't work so any idea would be great.
[Yield,txt,alldata]=xlsread('Book2','Yield'); a=length(txt(1,:)) i=1;
while(i<=a) txt(1,i)=Yield(:,i+1); i=i+1; end
  4 commentaires
Hikaru
Hikaru le 22 Août 2014
I am not sure I understood your problem. How about providing us with sample values of Yield, txt, and alldata for a starter?
And tell us what kind of error does matlab give?
Giorgi
Giorgi le 22 Août 2014
I uploaded excel file for you and now i want to upload it and divide it into three variables called as first second and third and assign them the data that is below them in the excel file.

Connectez-vous pour commenter.

Réponse acceptée

Hikaru
Hikaru le 22 Août 2014
[Yield,txt,alldata]=xlsread('Book2','Yield');
a=length(txt(1,:))
for i=1:a
assignin('base',[txt{i}],Yield(:,i));
end
  1 commentaire
Giorgi
Giorgi le 22 Août 2014
Well that works thanks a lot

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Data Import from MATLAB dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by