Borrar filtros
Borrar filtros

How can I align a file(txt, xls) onto a single variable?

1 visualización (últimos 30 días)
Matlab learner
Matlab learner el 30 de En. de 2023
Comentada: Fangjun Jiang el 1 de Feb. de 2023
When a file name is 'examine.txt' at location c:\users\matlab, can I align this file on a single variable 'var' by
var= 'C:\Users\matlab\examine.txt';?
  1 comentario
Fangjun Jiang
Fangjun Jiang el 1 de Feb. de 2023
you mean this?
var=fullfile('c:\users\matlab','examine.txt')
var = 'c:\users\matlab/examine.txt'

Iniciar sesión para comentar.

Respuestas (1)

Cris LaPierre
Cris LaPierre el 30 de En. de 2023
I would use the readmatrix or readtable function.
I'd recommend taking a little time to go through MATLAB Onramp. It will introduce you to the fundamentals of using MATLAB for free. The entire course should take around 2 hours, but you can also go through individual chapters as needed. For example, Ch 10 covers importing data.

Categorías

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

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by