read a .ssv file
Mostrar comentarios más antiguos
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);
Respuesta aceptada
Más respuestas (1)
f moradi
el 21 de Jun. de 2018
0 votos
Categorías
Más información sobre Oceanography and Hydrology en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!