importdata doesnt create structure

Hi everybody,
I have problems with the importdata function.
close all
clear
clc
set(0,'defaulttextinterpreter','latex')
headerlinesIn = 2;
delimiterIn = ' ';
a = "stuff1";
MAG1 = importdata(a,delimiterIn,headerlinesIn);
b = "stuff2";
COIL1 = importdata(b,delimiterIn,headerlinesIn);
COIL1 is a structure, containing the data part with all I need. MAG1 is just a 2x1 cell containing the headers.
Does anyone have an idea why my code doesnt work properly? It cant be difficult to skip the first two lines..
EDIT: I think it has something to do with how the data is saved. Is there another data reader than importfile?
EDIT2: I solved my problem with dlmread. I'm still intersted why importdata didn't work. Does anyone have an idea?
Thanks a lot!
Regards,
R

3 件のコメント

Stephen23
Stephen23 2017 年 11 月 26 日
編集済み: Stephen23 2017 年 11 月 26 日
What possible role does
set(0,'defaulttextinterpreter','latex')
have in your code?
Walter Roberson
Walter Roberson 2017 年 11 月 26 日
What does the file look like?
Sonam Gupta
Sonam Gupta 2017 年 12 月 6 日
What is the error you are getting when using the 'importdata' function?

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

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeData Import and Analysis についてさらに検索

タグ

質問済み:

2017 年 11 月 26 日

コメント済み:

2017 年 12 月 6 日

Community Treasure Hunt

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

Start Hunting!

Translated by