Dear sir, I have 25 text files of detail about wave parameters. How could i write the command to extract data from my selection file?

1 回表示 (過去 30 日間)
cd('D:\coding\datawave');
fid=fopen('file_21.txt');
data=textscan(fid,'%s %s %s %f %f');
height=cell2mat(data(4));
  1 件のコメント
KSSV
KSSV 2015 年 10 月 15 日
if all the data are numbers you can use importdata. Also go through fscanf, textread, load etc.

サインインしてコメントする。

採用された回答

Martin Schätz
Martin Schätz 2015 年 10 月 15 日
Do as sugested by previous answer, import, fscanf, textread, load... if it doesn't have any structer. If it does i suggest to use excel and xlsread. It can save you a lot of time.
  1 件のコメント
fooozie mtlb
fooozie mtlb 2015 年 10 月 15 日
編集済み: fooozie mtlb 2015 年 10 月 15 日
dear sir, thanks for your respond. what I try is to call the text file window to be display without no need to manually change text file name. I meant current directory of my file will display, then just clicking which one to be exist one my current folder.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeFile Operations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by