how to read file

6 vues (au cours des 30 derniers jours)
NGR MNFD
NGR MNFD le 13 Nov 2023
Réponse apportée : Manish le 27 Déc 2024
I have a data in the form of a picture below, in each of the six files with the extension .csv, I get the error as below. What Matlab code do you suggest?
Unable to find file or directory 'human1_antalgic1_SkeletonData1'.
c = 'C:\Users\HAMSHARI\Documents\MATLAB\movementdisorder';
files = dir(fullfile(c,'*','*Skeleton*.csv'));
n = numel(files);
DATA = cell(n,1);
for k=1:n
str = fullfile(files(k).folder, files(k).name);
DATA{k} = readmatrix(str);
end
for i= 1:10
for j = 1:20
str = sprintf('human%d_normal%d_SkeletonData%d', [i j]);
data = readmatrix(str);
end
end

Réponse acceptée

Manish
Manish le 27 Déc 2024
Hi,
I understand that you're facing a path mismatch error.
The path given as 'c' does not match the picture, as the required files are in the data folder.
To ensure the correct path, copy the path up to the data folder from the file explorer and paste it into the value of 'c'. This should resolve the error.
Hope this helps!

Plus de réponses (0)

Catégories

En savoir plus sur Data Import and Analysis dans Help Center et File Exchange

Tags

Produits


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by