How to get rid of The RPC server is unavailable Error?
Mostrar comentarios más antiguos
Hi everyone,
I have a main folder with 10 subfolders in it. Each subfolder has 200 subfolders within them. in each of these 200 subfolders, I have 4 .csv files. I created a loop that the code opens a subfolder, do what I want and then move to the next one as follows
D = 'C:\Users\....\Data\'
S1 = dir(fullfile(D,'*'));
N1 = setdiff({S1([S1.isdir]).name},{'.','..'});
A = {};
B = {};
C = {};
for kk = 1 : 10
kk
D1 = fullfile(D, N1{kk});
S2 = dir(fullfile(D1,'*'));
N2 = setdiff({S2([S2.isdir]).name},{'.','..'});
for ii = 1 : 200
ii
T1 = dir(fullfile(D1,N2{ii},'*'));
C = {T1(~[T1.isdir]).name};
for jj = 1 : numel(C)
if jj == 1
F = fullfile(D1,N2{ii},C{jj});
[n,~,~] = xlsread(F);
elseif jj == 2
F = fullfile(D1,N2{ii},C{jj});
m = csvread(F);
elseif jj == 3
F = fullfile(D1,N2{ii},C{jj});
p = csvread(F);
elseif jj == 4
F = fullfile(D1,N2{ii},C{jj});
q = csvread(F);
end
end
A{kk, ii} = complex(p, m);
B{kk, ii} = q(:,1) - q(1,1);
C{kk, ii} = n(2);
end
end
when I run the code, I've got the "RPC server is unavailable" error on kk=2, ii =21. However, when I check the code manualy for kk=2, ii =21 it works perfectly. Any idea how I can get rid of this error? How I can improve the code to run faster? Any input would be greatly appreciated.
Respuesta aceptada
Más respuestas (1)
Samuel Gray
el 26 de En. de 2022
0 votos
https://www.mathworks.com/help/matlab/ref/comserver.html
Categorías
Más información sobre Time Series Objects en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!