[moved] matrix operations in matlab

Status
Not open for further replies.

emerson_11

Member level 2
Joined
Jan 23, 2016
Messages
44
Helped
1
Reputation
2
Reaction score
1
Trophy points
8
Activity points
355
Am having a feature matrix with 12 rows and 5 coloumns which contains male and female image features. i want to split and assign first five rows for a variable 'male' and remaining rows for a variable 'female'. How can i do that in matlab?
 

Re: matrix operations in matlab

using colon) notation , matrices can be separated.
 
is this code correct?
clc;
clear all;
close all;
load m1
save m1.mat a
x = a,1);
y = a,2);
 

it just shows this error.
"Error in sample (line 5)
x=m1(1:5,;"
I have stored the matrix as m1.mat. so can call write the code like this?
load m1
x=m1(1:5,;
y=m1(6:12,;
 

a typo in my earlier post:
instead of
x=(1:5,;
y=(6:12,;
it should be

x=a(1:5,;
y=a(6:12,;

In your code , first comes 'load m1'

what is m1?
does it contain only one variable?

not clear in your code.
 

m1 is a matrix.I have stored my features in m1 matrix
 

if you refer m1 as a matrix , then x=m1(...); is correct
.
 

Am doing HOG feature extraction which gives me 1*4680 vector.Can anyone suggest me any steps to reduce the size of this vector?
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…