필터 지우기
필터 지우기

import multi type data in MATLAB

조회 수: 2 (최근 30일)
SARAH ZAVAREH
SARAH ZAVAREH 2011년 6월 29일
How I can import a text file in MATLAB including 256 columns: first column is string and other columns are numeric data.

채택된 답변

Gerd
Gerd 2011년 6월 29일
Hi Sarah,
depending on your specific file you can use
fid= fopen('File.txt');
textscan(fid,'%s%f.....');
fclose(fid);
Gerd
  댓글 수: 6
Jan
Jan 2011년 6월 29일
Data = textscan(fid,['%s' repmat('%f',1,255)]);
Then Data is a cell, which contains the different columns as elements. See "help textscan".
SARAH ZAVAREH
SARAH ZAVAREH 2011년 6월 29일
Thank you all, it works :)

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Text Files에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by