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.

Simple matlab question (matrix->vector)

Status
Not open for further replies.

Thommer

Junior Member level 1
Joined
Apr 12, 2005
Messages
18
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,437
Hello All!

I have a probably primitive problem, but please help me!

I have a matrix (arbitrary), I want each row of this matrix to be in a separate vector.
eg:

y=[ -1 1 -1 -1
1 -1 1 -1
-1 1 1 -1];

I tried the following:

t = reshape(y',1,[]) ->

[-1 1 -1 -1 1 -1 1 -1 -1 1 1
-1]

then I'm looking for a command that splits this vector into
3 four-long subvectors..

Or is the any other idea how to solve the main problem?

Thank you,
Thommer
 

Hi Thommer,

One way is like this

row1 = y(1,:); % first row
row2 = y(2,:); % second row
... etc...

Regards

Z
 

hi
you can reffer to the help bit
addressing single row i
n matlab 7 help
i think it 'll help u for ur problem
bye
PD
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top