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.

want to generate matrix in matlab.....help me

Status
Not open for further replies.

13maruf

Newbie level 6
Joined
Jan 18, 2011
Messages
11
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,350
i want to generate a (3:N) matrix in matlab where the value will be like this [a0 0 0;a1 a0 0;a2 a1 a0;a3 a2 a1;.........;an an-1 an-2]..........plz help me.......its urgent :(
 

a = [a1, a2,...,an]
b = a;
b(2,:)= [0, a(1: end-1)]
b(3,:)= [0, 0, a(1: end-2)]
B = b'

- b
 
a = [a1, a2,...,an];
b = reshape(a, row, col);
 

a = [a1, a2,...,an]
b = a;
b(2,:)= [0, a(1: end-1)]
b(3,:)= [0, 0, a(1: end-2)]
B = b'


- b

This code is helpful.But can you give me a code of this by using a for loop??
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top