Unable to perform assignment because the indices on the left side are not compatible with the size of the right side.

1 visualización (últimos 30 días)
flag = 1;
n = 1;
while flag == 1
if feof(fid)
flag=-1;
else
tmp = fgets(fid);
while size(tmp,2) < columnwidth;tmp = [tmp,' '];end
subjectID(n,:)=tmp;n=n+1;
end
end
Recieving this error regarding subjectID(n,:)=tmp;n=n+1;
Ran this script/code previously in Matlab2019 so unsure if this might be why this issue is arising now? Any insight would be greatly appreciated!

Respuesta aceptada

VBBV
VBBV el 7 de Abr. de 2021
%if true
subjectID{n,:}=tmp;n=n+1
  1 comentario
Vanessa Lopez
Vanessa Lopez el 7 de Abr. de 2021
Thank you! That worked, however, I am next receiving this error:
Error using cd
Path must be a string scalar or character vector.
In regards to this line of code:
tmp_subjectID = deblank(subjectID(master,:));
currentdir = [subject_folder,'/',tmp_subjectID,'/mri/assembly'];
cd (currentdir);
I'm wondering if it has something to do with the defined tmp_subjectID from the prior error?

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Get Started with Image Processing Toolbox en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by