import data column for later use on behalf

1 visualización (últimos 30 días)
Victoria Pilar Quesada García
Victoria Pilar Quesada García el 15 de Abr. de 2022
Comentada: Voss el 15 de Abr. de 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

Respuesta aceptada

Voss
Voss el 15 de Abr. de 2022
Editada: Voss el 15 de Abr. de 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 comentarios
Victoria Pilar Quesada García
Victoria Pilar Quesada García el 15 de Abr. de 2022
Thanks so much for the help!
Voss
Voss el 15 de Abr. de 2022
You're welcome!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Logical en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by