Invalid Subscript for Y, the table variable must be numeric array
Mostra commenti meno recenti
I am trying to plot the first 1000 data from the imported txt. file and I keep getting the error message and no idea how to slove it.
Does it mean the data from the second column are not the intergers?

Risposta accettata
Più risposte (1)
Image Analyst
il 8 Mag 2022
Use braces
A = table(rand(1300, 1), rand(1300, 1))
x = A{1 : 1000, 1}
y = A{1:1000, 2}
plot(x, y, 'b-')
Or like this:
A = table(rand(1300, 1), rand(1300, 1), 'VariableNames', {'X', 'Y'});
plot(A.X(1:1000), A.Y(1:1000), 'b-')
1 Commento
Eris Bolduc
il 8 Mag 2022
Categorie
Scopri di più su Tables 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!
