MATLAB Answers

mosalle
0

Read time and numerical data from txt file and plot in matlab.

Asked by mosalle
on 10 Oct 2019
Latest activity Answered by Stephan
on 10 Oct 2019
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 Comments

Sign in to comment.

Products

1 Answer