Array indices must be positive integers or logical values. Error in ecgtest (line 9) chestNoDC=chest1(0:10000)- meanChest;
Mostra commenti meno recenti
I'm facing this problem whenever I try to plot my values from "0"
Array indices must be positive integers
or logical values.
Error in ecgtestCAH (line 9)
chestNoDC=chest1(0:10000)- meanChest;
can you suggest me what to do to avoid this?
3 Commenti
Shayan Sepahvand
il 22 Set 2021
Hi,
The first element of a vector is addressed by 1, not 0: (one-based indexing not zero-based)
X = ones(1000,1);
X[1:20]% the first element
X[0:20]% you will get an error.
try this:
chestNoDC=chest1(1:10000)
Image Analyst
il 22 Set 2021
@Shayan Sepahvand, Can you post your answer below in the Answer Section, not up here in comments where we ask the poster for clarification? Thanks. That way, the poster can "Accept" your answer and you can get reputation points for it.
Shayan Sepahvand
il 22 Set 2021
Okay. Tnx.
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Creating and Concatenating Matrices in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

