Azzera filtri
Azzera filtri

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

1 visualizzazione (ultimi 30 giorni)
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

Risposte (1)

Ishan Gupta
Ishan Gupta il 28 Lug 2022
Try to use breakpoints to check the value of index.

Categorie

Scopri di più su Model Compatibility in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by