Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

matrix in matlab enquiry

Status
Not open for further replies.

ill2000m

Electrical
Oct 7, 2003
7
I am a new user in matlab . just wonder if anyone know how to use matrix in matlab to do the following

i got 12 and wish to turn it into 1122
34 1122
3344
3344

like the following .. i dont know which matlab command i should use
12
34
=
1122
1122
3344
3344
 
Replies continue below

Recommended for you

This should work for your 2x2 case. I'll leave it to you to extend it to nxn.
Code:
A = [1 2
     3 4]

X = [1 0
     1 0
     0 1
     0 1]

B = X*A*X'
M

--
Dr Michael F Platten
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor