Read specific column from the text file and how to store the values into the matrix/vector?

How to store the values of the specific columns get from the text file into the matrix or vector ? Thank you

More Answers (1)

clc;
data=load('text_feat.txt');
bias=data(:,1);
bias=bias';
feature=data(:,2:5);
[row col]=size(feature);
F=zeros(row,col);
for i=1:row
for j=1:col
F(i,j)=F(i,j)+feature(i,j);
end
end
disp(size(F));

Categories

Find more on MATLAB in Help Center and File Exchange

Tags

Asked:

on 6 Feb 2019

Edited:

on 6 Feb 2019

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!