Info
Questa domanda è chiusa. Riaprila per modificarla o per rispondere.
this code shows error?
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
S=S(1:f-1,f+1:length(S))
,,,, error:?? Index exceeds matrix dimensions.
0 Commenti
Risposte (2)
Walter Roberson
il 26 Feb 2013
Yes, that would occur if S is not two-dimensional and at least f-1 elements in the first dimension and length(S) elements in the second dimension.
Are you possibly trying to remove element #f from S? If so then
S(f) = [];
or
S = S([1:f-1, f+1:numel(S)]);
0 Commenti
Jan
il 26 Feb 2013
Another guess:
Did you define "length" as a variable? Then "length(S)" might fail. Test this by:
dbstop if error
% start the code until Matlab stops at the problem. Then:
which length
Questa domanda è chiusa.
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!