Read time and numerical data from txt file and plot in matlab.
2 次查看(过去 30 天)
显示 更早的评论
Hello,
Previously, I saved mydata.txt in .xlsx (excel format) and used:-
data=xlsread('mydata.xlsx');
ax=(data(:,3))';
ay=(data(:,4))';
az=(data(:,5))';
bx=(data(:,6))';
by=(data(:,7))';
bz=(data(:,8))';
time=t=(data(:,2))';
%plot(t,ax,'y-',t,ay,'r-',t,az,'m-',t,bx,'+-',t,by,'o-',t,bz,'*-');
Instead of use xlsread is there any other method to directly read txt file?
0 个评论
采纳的回答
Stephan
2019-10-10
If you use R2019a or later, maybe this is interesting for you:
also, beginning from R2013b:
and beginning from R2019a:
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Characters and Strings 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!