Error using plot Invalid second data argument
Afficher commentaires plus anciens
Hi,
I am trying to plot a vector (size 690) and I am getting the error listed above (invalid second data argument).
I extracted data from a txt file using the function textscan. I have attached the code I am using below along with the matrix and vector, Aa Rolla. I am relatively new to MATLAB and I would appreciate the help.
%orientation data for sensor a
filename = 'exampleLogfile-000.txt';
fileIDa = fopen(filename);
Aa = textscan(fileIDa, '%s %s %s %s ', 'Headerline', 5);
Rolla = Aa{1,2};
Pitcha = Aa{1,3};
Yawa = Aa{1,4};
i = 1:690;
plot(i, Rolla);
1 commentaire
Takhyung Seon
le 6 Déc 2017
Réponse acceptée
Plus de réponses (1)
Roger Stafford
le 6 Déc 2017
0 votes
The variable 'Rolla' needs to be the same size as the 1:690 vector. You can check that by writing "size(Rolla)" in your script.
Catégories
En savoir plus sur Filter Design dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!