Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Need program in Matlab which produces a 4*4 matrix that shows digits

Status
Not open for further replies.

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....
 

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
 

program in matlab

the first line must be :

A=zeros(4,4);
 

Re: program in matlab

sorry
it is only typo
the first line of the code is zeros(4,4) not zeos(4,4)
Roshdy
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top