Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic 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.

Register Log in

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

Roshdy

Member level 3
Joined
Nov 23, 2005
Messages
58
Helped
2
Reputation
4
Reaction score
0
Trophy points
1,286
Location
Egypt
Activity points
1,750
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
 

mro83

Member level 5
Joined
Oct 6, 2004
Messages
86
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);
 

Roshdy

Member level 3
Joined
Nov 23, 2005
Messages
58
Helped
2
Reputation
4
Reaction score
0
Trophy points
1,286
Location
Egypt
Activity points
1,750
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.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top