how can I get all values in matrix

That is the simple question for you. I run for loop but I could not all of C values. I just want to write all of values on command window into the C matrix after for loop. Just I can see last value in C matrix. How can I write these values which into the for loop. THANX...
close all;
clear all;
clc;
A = xlsread('Matlab Deneme.xls');
boyut=size(A);
m=length(A(:,1));
n=length(A(1,:));
s=0;
for d=1:n-1
s=s+d;
end
for i=1:n-1
for j=i+1:n
% for ii=1:s
bs=find(A(:,i)==1 & A(:,j)==0);
cs=find(A(:,i)==0 & A(:,j)==1);
as=find(A(:,i)==1 & A(:,j)==1);
% bs(1:end);
% cs(1:end);
% as(1:end);
b=length(bs);
c=length(cs);
a=length(as);
C=[b,c,a]'
end
end
% end
[EDITED, Jan: Code formatted]

Answers (0)

This question is closed.

Asked:

on 17 Dec 2012

Closed:

on 20 Aug 2021

Community Treasure Hunt

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

Start Hunting!