100% MATLAB prog సుడొకు తయారీ

clc
clear all
modalu=ceil(rand*9) %to geerate a integer in the range [1, 9]
suDoku_v= zeros(9,9);
for i=1:3
 for j=1:9
  tatkal=modalu+(3*(i-1))+j-1;
  suDoku_v(i,j)= tatkal;
   while(suDoku_v(i,j)>9)
    suDoku_v(i,j)=suDoku_v(i,j)-9;
  end
end
end
for k=1:3
 suDoku_v(3+k,:)=circshift(suDoku_v(k,:),-1);  %left shifting kth row by 1 unit to get (3+k)th row
 suDoku_v(6+k,:)=circshift(suDoku_v(k,:),-2);
end
suDoku_v



modalu = 7  suDoku_v =       7   8   9   1   2   3   4   5   6     1   2   3   4   5   6   7   8   9     4   5   6   7   8   9   1   2   3     8   9   1   2   3   4   5   6   7     2   3   4   5   6   7   8   9   1     5   6   7   8   9   1   2   3   4     9   1   2   3   4   5   6   7   8     3   4   5   6   7   8   9   1   2     6   7   8   9   1   2   3   4   5

కామెంట్‌లు

ఈ బ్లాగ్ నుండి ప్రసిద్ధ పోస్ట్‌లు

100% C prog to write content into a file and then read it back onto the console

Assignment to gain eligibility to industry visit

Spic macay