import data column for later use on behalf

1 vue (au cours des 30 derniers jours)
Victoria Pilar Quesada García
Commenté : Voss le 15 Avr 2022
hello I have an excel with a column of numbers that represent maximums, I also have it in .txt format and what I want is to be able to use it in my program but when I try to enter it in the program with max=A.data(:, ) it does not work
file='Maximos ordenados.txt';
A=importdata(file);
max=A.data(:,1)
can someone help me, thanks

Réponse acceptée

Voss
Voss le 15 Avr 2022
Modifié(e) : Voss le 15 Avr 2022
A is a matrix containing the data from the txt file. (It doesn't make sense to say A.data when A is a matrix.)
file='Maximos ordenados.txt';
A=importdata(file)
A = 1023×1
0.9221 1.2559 0.8798 1.2434 21.0027 1.3572 0.9759 1.6880 1.6885 0.4037
max=A.data(:,1)
Dot indexing is not supported for variables of this type.
maximum = A; % make a copy of A, and call it max(imum) ?
  2 commentaires
Victoria Pilar Quesada García
Thanks so much for the help!
Voss
Voss le 15 Avr 2022
You're welcome!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Logical dans Help Center et File Exchange

Produits


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by