displaying all values from a loop

for n=1:6
conc=E*[od(:,n) od(:,n+1)]';
con=conc';
end
od is a mat file containing 12 columns and each column contain 15360 rows of data and E is a 2by2 matrix on executing this loop the final answer in con contain only the values of 11th and 12th columns but I want all columns to be display all columns (from 1 to 12) in the final answer. can any one help me with this?

 採用された回答

James Tursa
James Tursa 2016 年 9 月 10 日

0 投票

Is this what you want:
con = zeros(size(od));
for n=1:2:11
con(:,n:n+1) = od(:,n:n+1) * E';
end

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeLoops and Conditional Statements についてさらに検索

タグ

質問済み:

2016 年 9 月 10 日

コメント済み:

2016 年 9 月 11 日

Community Treasure Hunt

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

Start Hunting!

Translated by