import data column for later use on behalf

1 Ansicht (letzte 30 Tage)
Victoria Pilar Quesada García
Kommentiert: Voss am 15 Apr. 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

Akzeptierte Antwort

Voss
Voss am 15 Apr. 2022
Bearbeitet: Voss am 15 Apr. 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 Kommentare
Victoria Pilar Quesada García
Thanks so much for the help!
Voss
Voss am 15 Apr. 2022
You're welcome!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Produkte


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by