Problem with importdata while retrieving string from txt file.

%My txt file is trial.txt;
p100 4163603.622 441621.461 1149.353
p101 4163595.878 441621.927 1151.896
p102 4163598.903 441621.752 1150.876
[FileName1,PathName] = uigetfile('*.txt','Select the txt file')
[num,txt1,raw] = importdata(FileName1)
%In this case I need to retrieve num, txt1 and raw but it gives failure because of strings value.
%How can I retrieve and seperate num, txt1 and raw data from trial.txt?

2 件のコメント

Azzi Abdelmalek
Azzi Abdelmalek 2014 年 2 月 2 日
編集済み: Azzi Abdelmalek 2014 年 2 月 2 日
what is the difference between num and raw data?
sermet
sermet 2014 年 2 月 2 日
num is double, raw is cell

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

 採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2014 年 2 月 2 日

0 投票

v=importdata(FileName1)
num=v.data % Your numeric data
text1=v.textdata

1 件のコメント

sermet
sermet 2014 年 2 月 2 日
thank you Azzi, you done lots of the tasks for me today.

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeApp Building についてさらに検索

質問済み:

2014 年 2 月 2 日

コメント済み:

2014 年 2 月 2 日

Community Treasure Hunt

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

Start Hunting!

Translated by