division of uploaded excel file

조회 수: 2 (최근 30일)
Giorgi
Giorgi 2014년 8월 22일
댓글: Giorgi 2014년 8월 22일
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
Hikaru
Hikaru 2014년 8월 22일
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 2014년 8월 22일
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.

댓글을 달려면 로그인하십시오.

채택된 답변

Hikaru
Hikaru 2014년 8월 22일
[Yield,txt,alldata]=xlsread('Book2','Yield');
a=length(txt(1,:))
for i=1:a
assignin('base',[txt{i}],Yield(:,i));
end
  댓글 수: 1
Giorgi
Giorgi 2014년 8월 22일
Well that works thanks a lot

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Import from MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by