Error: Index exceeds matrix dimensions.
2 views (last 30 days)
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
Accepted Answer
Star Strider
on 3 Apr 2015
This works:
ratings=num(:,1);
speed=txt(:,1);
vehicles =txt(:,3);
The ‘num’ variable has one column, ‘txt’ has three, only 1 and 3 with any information.
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!