Why I get the error Index in position 2 exceeds array bounds (must not exceed 1).
3 views (last 30 days)
Show older comments
V = X(;,2)*0.028
File attached is X
0 Comments
Accepted Answer
Ameer Hamza
on 8 May 2020
Edited: Ameer Hamza
on 8 May 2020
Try this
X = readmatrix('FinalProj_TVdata.csv');
V = X(:,2)*0.028;
Or this if you are using R2018b or earlier.
X = readtable('FinalProj_TVdata.csv');
V = X{:,2}*0.028;
0 Comments
More Answers (0)
See Also
Categories
Find more on Matrix Indexing 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!