Dec 20, 2005 #1 S sarah_spike Newbie level 6 Joined Nov 9, 2005 Messages 11 Helped 2 Reputation 4 Reaction score 1 Trophy points 1,283 Activity points 1,338 who can write a program in matlab,that can produce a matrix(4*4) ,that show us the digits.for example for digit 1 ,produce that matrix, the first column of it all arrays are 1 and other arrays are 0.and for other digits act in this way....
who can write a program in matlab,that can produce a matrix(4*4) ,that show us the digits.for example for digit 1 ,produce that matrix, the first column of it all arrays are 1 and other arrays are 0.and for other digits act in this way....
Dec 20, 2005 #2 Roshdy Member level 3 Joined Nov 23, 2005 Messages 57 Helped 2 Reputation 4 Reaction score 0 Trophy points 1,286 Location Egypt Activity points 1,738 Re: program in matlab for the digit you refer given in the variabe (x) %************************************ A=zeos(4,4); A,x)=x*ones(4,1); %************************************ The above code will produce a matrix (A) has zero elements except for the column number (x). All elements of the column number (x) will equal (x). If this differs from what you need reply and explain what do you need exactly Roshdy
Re: program in matlab for the digit you refer given in the variabe (x) %************************************ A=zeos(4,4); A,x)=x*ones(4,1); %************************************ The above code will produce a matrix (A) has zero elements except for the column number (x). All elements of the column number (x) will equal (x). If this differs from what you need reply and explain what do you need exactly Roshdy
Dec 22, 2005 #3 mro83 Member level 5 Joined Oct 6, 2004 Messages 85 Helped 11 Reputation 22 Reaction score 4 Trophy points 1,288 Location Mashad Activity points 758 program in matlab the first line must be : A=zeros(4,4);
Dec 23, 2005 #4 Roshdy Member level 3 Joined Nov 23, 2005 Messages 57 Helped 2 Reputation 4 Reaction score 0 Trophy points 1,286 Location Egypt Activity points 1,738 Re: program in matlab sorry it is only typo the first line of the code is zeros(4,4) not zeos(4,4) Roshdy
Re: program in matlab sorry it is only typo the first line of the code is zeros(4,4) not zeos(4,4) Roshdy