Filter löschen
Filter löschen

Index in position 2 is invalid. Array indices must be positive integers or logical values.

1 Ansicht (letzte 30 Tage)
Could someone explain what is the problem?
The problem is on the line #7
datavalues = dlmread(tline);
tline = fgets(fid);
index = str2num(tline);
datacoord = datavalues(:,index);
tline = fgets(fid);
index = str2num(tline);
datavalues_hard = datavalues(:,index);
tline = fgets(fid);
index_reg = str2num(tline);
end

Antworten (1)

Ishan Gupta
Ishan Gupta am 28 Jul. 2022
Try to use breakpoints to check the value of index.

Kategorien

Mehr zu Model Compatibility finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by