read a .ssv file
Show older comments
Hello I want to read a .ssv format file in MATLAB and put it in a matrix The file with format .ssv contains 1500 lines and 24 columns Help me please ...For example, this code did not answer. and I dont know what to do
function [training_set, test_set] = read_data(train_path, test_path)
train_file = fopen(train_path);
training_set = cell2mat(textscan(train_file, '%f %f %f %f'));
fclose(train_file);
% open the test data and save to a matrix
test_file = fopen(test_path);
test_set = cell2mat(textscan(test_file, '%f %f %f %f'));
fclose(test_file);
Accepted Answer
More Answers (1)
f moradi
on 21 Jun 2018
0 votes
Categories
Find more on Oceanography and Hydrology in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!