what are steps to create a combination array ?

what are steps to create a combination array which are given through imported excel sheet then exporting the results to anther excel sheet ? note:the elements of the table are numbers

답변 (2개)

Ilham Hardy
Ilham Hardy 2014년 2월 20일

0 개 추천

doc xlsread
doc xlswrite
to combine array
C = [A B]; or C = [A,B];

댓글 수: 1

mohammad
mohammad 2014년 2월 21일
Thank you for your answer, but this is not what I want . please visit this site and you will find what i need exactly but through the matlab functions and not through Excel function http://stackoverflow.com/questions/10692653/excel-vba-to-create-every-possible-combination-of-a-range?answertab=oldest#tab-top

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

Andrei Bobrov
Andrei Bobrov 2014년 2월 21일
편집: Andrei Bobrov 2014년 2월 21일

0 개 추천

[~,~,c] = xlsread('E:\xlsfile1.xlsx');
c1 = c(3:end,:);
ii = cellfun(@(x)all(~isnan(x)),c1);
n = sum(ii);
idx = bsxfun(@plus,fliplr(fullfact(n)),[0 cumsum(n(1:end-1))]);
c2 = c1(ii);
out = c2(idx);
xlswrite('E:\newxlsfile.xlsx',out);

카테고리

도움말 센터File Exchange에서 Logical에 대해 자세히 알아보기

제품

질문:

2014년 2월 19일

편집:

2014년 2월 21일

Community Treasure Hunt

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

Start Hunting!

Translated by