How to interpret units from excel sheet data,when reading into MATLAB?
1 view (last 30 days)
Show older comments
I imported this data from a NI-DAQ task,into excel,in this format.I now need to read this into MATLAB for plotting purposes,However,MATLAB seems to only recognize the data as text. Kindly suggest ways to resolve the problem.
0 Comments
Answers (1)
Azzi Abdelmalek
on 26 Dec 2013
%If your data lookds like this
A={1 '-1.5m';2 '-2.5m'}
c1=A(:,1);
c2=A(:,2);
t=cell2mat(c1)
y=str2double(strrep(c2,'m',''))
plot(t,y)
2 Comments
See Also
Categories
Find more on Spreadsheets in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!