Need Help- .txt to array values
Mostrar comentarios más antiguos
I have a text file with the following values,
10210000000
10211000000
10210000000
10204000000
10201000000
10201000000
i used "textscan" command to read this file, but i want to store that values in an array.
i.e.
data=[10210000000 10211000000 10210000000 10204000000 10201000000 10201000000]
is it possible to do in MATLAB
Respuestas (1)
Azzi Abdelmalek
el 9 de Sept. de 2013
Editada: Azzi Abdelmalek
el 9 de Sept. de 2013
You can use
v=dlmread('file.txt')
%or
v=importdata('file.txt')
%or
fid=fopen('file.txt');
v=cell2mat(textscan(fid,'%f'));
fclose(fid)
Categorías
Más información sobre Large Files and Big Data 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!