How i creat Costomer fscanf?
Show older comments
Hellow,
I want fscanf a text file same as attech file with the command below:
%%
fileID= fopen('sol2.txt');
sizez=[2,inf];
T=fscanf(fileID,'%f %f,sizez)
fclose(fileID);
%%
But it raeds only 2 Array while i want all of array , readed
How is it possible??
Accepted Answer
More Answers (1)
Arif Hoq
on 24 Jan 2023
use readtable function
a=readtable("sol2.txt");
3 Comments
Majid Majid
on 24 Jan 2023
Arif Hoq
on 24 Jan 2023
a=table2cell(readtable("sol2.txt"));
f=split(a(:,2),'E2');
g=cell2table(f(:,1));
h=table(a(:,1),table2array(g));
Majid Majid
on 24 Jan 2023
Categories
Find more on Import Data in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!