Error: Index exceeds matrix dimensions.
Show older comments
clear
clc
[num,txt]=xlsread('tire_ratings.xls');
ratings=num(:,1);
speed=num(:,2);
vehicles =num(:,3);
text=txt(1,1:3);
TR=triangulation(ratings,speed,vehicles);
size(TR)
%This is the error/output
Index exceeds matrix dimensions.
Error in ENG1102_11C (line 9)
speed=num(:,2);
6 Comments
Andrew Newell
on 2 Apr 2015
I highlighted your code for you. In future, please select your code and click on the {} Code button.
Andrew Newell
on 2 Apr 2015
What size is num?
Star Strider
on 2 Apr 2015
Care to share ‘tire_ratings.xls’ with the rest of us so we can help you understand what the problem is? (Use the ‘paperclip’ icon, and remember to use both the ‘Choose file’ and ‘Attach file’ buttons.)
Cody Baumann
on 3 Apr 2015
Cody Baumann
on 3 Apr 2015
Cody Baumann
on 3 Apr 2015
Accepted Answer
More Answers (0)
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!