Hello,i want to run given below program for n set of inputs. example of input sets- set 1. f= 7, c0= 1, r0= 3 set 2. f= 9, c0= 2, r0= 4
Every input set will generate 5*5 output matrix as t=5
Then how can i get actual output in column in command window as- For example,
output = output for input set1(matrix of 5*5) output for input set2(matrix of 5*5) . . output for input set n(matrix of 5*5)function poster
t= 5;
f = input ('Enter d0 :');
c0= input ('Enter c0 :');
r0 = input ('Enter r0 :');
t=t-1;
M = zeros(t);
for k = 1:f p = randperm(t); for s = 1:t M(p(s),s) = M(p(s),s) + 1; end end M = [M(:,1:c0-1),zeros(t,1),M(:,c0:t)]; M = [M(1:r0-1,:);zeros(1,t+1);M(r0:t,:)];
M(1:(t+2):(t+1)*(t+1))= 0;
disp(M);
end
Best Answer